Class FixedRateSource.TransportFixedRateSource<D>
java.lang.Object
de.iip_ecosphere.platform.services.environment.services.FixedRateSource<D>
de.iip_ecosphere.platform.services.environment.services.FixedRateSource.TransportFixedRateSource<D>
- Type Parameters:
D- the type of data
- Enclosing class:
FixedRateSource<D>
Specializes the fixed-rate source for
TransportConnector.- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA parameter/configuration object for theFixedRateSource.Nested classes/interfaces inherited from class de.iip_ecosphere.platform.services.environment.services.FixedRateSource
FixedRateSource.FixedRateParams, FixedRateSource.TransportFixedRateSource<D> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTransportFixedRateSource(Supplier<D> dataCreator, FixedRateSource.TransportFixedRateSource.TransportFixedRateParams params) Creates a transport-based fixed rate source.TransportFixedRateSource(Supplier<D> dataCreator, FixedRateSource.TransportFixedRateSource.TransportFixedRateParams params, DataIngestor<D> ingestor, Supplier<ServiceState> stateSupplier) Creates a transport-based fixed rate source.TransportFixedRateSource(Supplier<D> dataCreator, FixedRateSource.TransportFixedRateSource.TransportFixedRateParams params, Supplier<ServiceState> stateSupplier) Creates a transport-based fixed rate source. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCalled to disconnect from the ingestor.protected voidIs called to ingest data provided byFixedRateSource.dataCreator.protected voidSends on the transport connector.protected voidSends on the transport connector, logging exceptions.Methods inherited from class de.iip_ecosphere.platform.services.environment.services.FixedRateSource
doStartExperiment, noIngestor, notifySent, notifyStarting, notifyStopping, runningState, setIngestor, start
-
Field Details
-
connector
private de.iip_ecosphere.platform.transport.connectors.TransportConnector connector -
channel
-
-
Constructor Details
-
TransportFixedRateSource
public TransportFixedRateSource(Supplier<D> dataCreator, FixedRateSource.TransportFixedRateSource.TransportFixedRateParams params) Creates a transport-based fixed rate source.- Parameters:
dataCreator- the data creator incrementally creating the data to ingestparams- the parameter/configuration object
-
TransportFixedRateSource
public TransportFixedRateSource(Supplier<D> dataCreator, FixedRateSource.TransportFixedRateSource.TransportFixedRateParams params, Supplier<ServiceState> stateSupplier) Creates a transport-based fixed rate source.- Parameters:
dataCreator- the data creator incrementally creating the data to ingestparams- the parameter/configuration object
-
TransportFixedRateSource
public TransportFixedRateSource(Supplier<D> dataCreator, FixedRateSource.TransportFixedRateSource.TransportFixedRateParams params, DataIngestor<D> ingestor, Supplier<ServiceState> stateSupplier) Creates a transport-based fixed rate source. Ingestion happens throughingestorrather than the supplied transport connector while explicit sending happens via the transport connector.- Parameters:
dataCreator- the data creator incrementally creating the data to ingestparams- the parameter/configuration objectstateSupplier- service state supplier
-
-
Method Details
-
disconnect
Description copied from class:FixedRateSourceCalled to disconnect from the ingestor.- Specified by:
disconnectin classFixedRateSource<D>- Throws:
IOException- if disconnecting fails
-
sendSafe
Sends on the transport connector, logging exceptions.- Parameters:
channel- the channel to send ondata- the data to send
-
send
Sends on the transport connector.- Parameters:
channel- the channel to send ondata- the data to send- Throws:
IOException- if sending fails
-
ingest
Description copied from class:FixedRateSourceIs called to ingest data provided byFixedRateSource.dataCreator.- Overrides:
ingestin classFixedRateSource<D>- Parameters:
data- the data- Throws:
IOException- if ingesting fails
-