java.lang.Object
swim.api.agent.AbstractAgent
nstream.adapter.common.NstreamAgent
nstream.adapter.common.egress.PublisherAgent<JdbcEgressSettings,Void>
nstream.adapter.jdbc.JdbcPublishingAgent
- All Implemented Interfaces:
nstream.adapter.common.schedule.StageService,swim.api.agent.Agent,swim.api.downlink.DownlinkFactory,swim.api.lane.LaneFactory,swim.api.ref.WarpRef,swim.api.store.Store,swim.concurrent.Schedule,swim.util.Log
public abstract class JdbcPublishingAgent
extends nstream.adapter.common.egress.PublisherAgent<JdbcEgressSettings,Void>
An abstract Web Agent that can publish to a JDBC database.
The JdbcPublishingAgent loads agent configuration into a settings
object on agent start.
Subclasses can use the configured HikariDataSource and settings to publish
state.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface nstream.adapter.common.schedule.StageService
nstream.adapter.common.schedule.StageService.StageCallable<V extends Object>, nstream.adapter.common.schedule.StageService.StageConsumer<V extends Object>, nstream.adapter.common.schedule.StageService.StageRunnable -
Field Summary
FieldsFields inherited from class nstream.adapter.common.egress.PublisherAgent
egressSettingsFields inherited from class nstream.adapter.common.NstreamAgent
apiLaneSummary, labeledLog, stageAmenity, summaryFields inherited from class swim.api.agent.AbstractAgent
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddidStart()Stage publication on agent start.protected JdbcEgressSettingsparseEgressSettings(swim.structure.Value prop) protected voidprotected voidvoidwillStop()Close any open resources on agent close.Methods inherited from class nstream.adapter.common.egress.PublisherAgent
loadSettings, loadSettings, loadSettings, publishMethods inherited from class nstream.adapter.common.NstreamAgent
apiLaneSummaryDecodeRequest, apiLaneSummaryDoRespond, debug, execute, executeNonblocking, fail, handleDeferrableException, info, prepareLoop, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, scheduleWithInformedBackoff, trace, warnMethods inherited from class swim.api.agent.AbstractAgent
agentContext, agentId, agents, asyncStage, cipherSuite, close, closeAgent, closeAgent, command, command, command, command, command, command, command, command, command, command, command, command, command, command, command, command, commandLane, demandLane, demandMapLane, didClose, didFail, didLoad, didOpen, didStop, didUnload, downlink, downlinkHttp, downlinkList, downlinkMap, downlinkValue, downlinkWs, error, geospatialData, geospatialData, geospatialLane, getAgent, getAgent, getAgent, getLane, getProp, getProp, hostRef, hostRef, hostUri, httpLane, isSecure, joinMapLane, joinValueLane, lane, laneRef, laneRef, laneRef, laneRef, link, listData, listData, listLane, localAddress, localCertificates, localIdentity, localPrincipal, mapData, mapData, mapLane, nodeRef, nodeRef, nodeRef, nodeRef, nodeUri, openAgent, openAgent, openAgent, openAgent, openAgent, openAgent, openLane, props, remoteAddress, remoteCertificates, remoteIdentity, remotePrincipal, schedule, securityProtocol, setTimer, spatialData, spatialData, spatialLane, stage, supplyLane, timer, valueData, valueData, valueLane, willClose, willLoad, willOpen, willStart, willUnload, wsLane
-
Field Details
-
pool
protected com.zaxxer.hikari.HikariDataSource pool
-
-
Constructor Details
-
JdbcPublishingAgent
public JdbcPublishingAgent()
-
-
Method Details
-
parseEgressSettings
- Specified by:
parseEgressSettingsin classnstream.adapter.common.egress.PublisherAgent<JdbcEgressSettings,Void>
-
publish
- Specified by:
publishin classnstream.adapter.common.egress.PublisherAgent<JdbcEgressSettings,Void>
-
stagePublication
protected void stagePublication()- Specified by:
stagePublicationin classnstream.adapter.common.egress.PublisherAgent<JdbcEgressSettings,Void>
-
didStart
public void didStart()Stage publication on agent start.- Specified by:
didStartin interfaceswim.api.agent.Agent- Overrides:
didStartin classswim.api.agent.AbstractAgent
-
willStop
public void willStop()Close any open resources on agent close.- Specified by:
willStopin interfaceswim.api.agent.Agent- Overrides:
willStopin classswim.api.agent.AbstractAgent
-