Class PublisherFactory


  • public final class PublisherFactory
    extends java.lang.Object
    The main entry point to the NXCALS service. Creates the @see Publisher instance for a given system name and data converting function.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <V> Publisher<V> createBufferedPublisher​(java.lang.String systemName, java.util.function.Function<V,​cern.cmw.datax.ImmutableData> converter, java.time.Duration bufferTime, java.time.Duration flushingFrequency)
      Creating the publisher from the system name and conversion function.
      <V> Publisher<V> createPublisher​(java.lang.String systemName, java.util.function.Function<V,​cern.cmw.datax.ImmutableData> convertingFunction)
      Creating the publisher from the system name and conversion function.
      static PublisherFactory newInstance()
      Factory method.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • createPublisher

        public <V> Publisher<V> createPublisher​(java.lang.String systemName,
                                                java.util.function.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​(java.lang.String systemName,
                                                        java.util.function.Function<V,​cern.cmw.datax.ImmutableData> converter,
                                                        java.time.Duration bufferTime,
                                                        java.time.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>