Package cern.nxcals.api.ingestion
Class PublisherFactory
java.lang.Object
cern.nxcals.api.ingestion.PublisherFactory
The main entry point to the NXCALS service. Creates the @see
Publisher instance for a given system name and
data converting function.-
Method Summary
Modifier and TypeMethodDescription<V> Publisher<V> createBufferedPublisher(String systemName, Function<V, cern.cmw.datax.ImmutableData> converter, Duration bufferTime, Duration flushingFrequency) Creating the publisher from the system name and conversion function.<V> Publisher<V> createPublisher(String systemName, Function<V, cern.cmw.datax.ImmutableData> convertingFunction) Creating the publisher from the system name and conversion function.static PublisherFactoryFactory method.
-
Method Details
-
createPublisher
public <V> Publisher<V> createPublisher(String systemName, Function<V, cern.cmw.datax.ImmutableData> convertingFunction) Creating the publisher from the system name and conversion function.- Type Parameters:
V- Type of data to publish.- Parameters:
systemName- Name of system to publish.convertingFunction- Function used to convert data.- Returns:
- Publisher which can publish data of type
<V>
-
createBufferedPublisher
public <V> Publisher<V> createBufferedPublisher(String systemName, Function<V, cern.cmw.datax.ImmutableData> converter, Duration bufferTime, Duration flushingFrequency) Creating the publisher from the system name and conversion function.- Type Parameters:
V- Type of data to publish.- Parameters:
systemName- Name of system to publish.converter- Function used to convert data.bufferTime- specifies how long messages should be internally buffered before being sent to NXCALSflushingFrequency- specifies how often the internal buffer should be checked for flushing- Returns:
- Publisher which can publish data of type
<V>
-
newInstance
Factory method.- Returns:
- New instance of
PublisherFactory
-