Class PublisherFactory

java.lang.Object
cern.nxcals.api.ingestion.PublisherFactory

public final class PublisherFactory extends Object
The main entry point to the NXCALS service. Creates the @see Publisher instance for a given system name and data converting function.
  • 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 NXCALS
      flushingFrequency - specifies how often the internal buffer should be checked for flushing
      Returns:
      Publisher which can publish data of type <V>
    • newInstance

      public static PublisherFactory newInstance()
      Factory method.
      Returns:
      New instance of PublisherFactory