Interface IPublisher<T>

All Superinterfaces:
AutoCloseable, IConnection, ITopicConnection, IURIConnection

public interface IPublisher<T> extends ITopicConnection
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    broadcast(T bean)
    Sends information about a specific progress using the topic to broadcast the information which is the bean (JSON encoded but if an ISubscriber is used the API user is not exposed to how the encoding works)
    void
    You may optionally set a logging stream on a publisher so that publications can be recorded to file for debugging.

    Methods inherited from interface org.eclipse.scanning.api.event.core.IConnection

    close, disconnect, isConnected

    Methods inherited from interface org.eclipse.scanning.api.event.core.ITopicConnection

    getTopicName

    Methods inherited from interface org.eclipse.scanning.api.event.core.IURIConnection

    getConnectorService, getUri
  • Method Details

    • broadcast

      void broadcast(T bean) throws EventException
      Sends information about a specific progress using the topic to broadcast the information which is the bean (JSON encoded but if an ISubscriber is used the API user is not exposed to how the encoding works)
      Parameters:
      bean -
      Throws:
      EventException
    • setLoggingStream

      void setLoggingStream(PrintStream stream)
      You may optionally set a logging stream on a publisher so that publications can be recorded to file for debugging.
      Parameters:
      stream -