Class SSEQueueBroadcastResource

  • All Implemented Interfaces:
    adams.core.AdditionalInformationHandler, adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.SizeOfHandler, adams.flow.core.FlowContextHandler, RESTPlugin, Serializable

    @Path("/events")
    public class SSEQueueBroadcastResource
    extends AbstractRESTPluginWithFlowContext
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected String m_EventName
      the name of the event.
      protected int m_Interval
      the poll interval in msec.
      protected adams.flow.control.StorageName m_StorageName
      the name of the queue in the internal storage.
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Field Detail

      • m_StorageName

        protected adams.flow.control.StorageName m_StorageName
        the name of the queue in the internal storage.
      • m_Interval

        protected int m_Interval
        the poll interval in msec.
      • m_EventName

        protected String m_EventName
        the name of the event.
    • Constructor Detail

      • SSEQueueBroadcastResource

        public SSEQueueBroadcastResource()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class adams.core.option.AbstractOptionHandler
      • setStorageName

        public void setStorageName​(String value)
        Sets the name for the queue in the internal storage.
        Parameters:
        value - the name
      • setStorageName

        public void setStorageName​(adams.flow.control.StorageName value)
        Sets the name for the queue in the internal storage.
        Parameters:
        value - the name
      • getStorageName

        public adams.flow.control.StorageName getStorageName()
        Returns the name for the queue in the internal storage.
        Returns:
        the name
      • storageNameTipText

        public String storageNameTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setInterval

        public void setInterval​(int value)
        Sets the polling interval in seconds.
        Parameters:
        value - the interval
      • getInterval

        public int getInterval()
        Returns the polling interval in milli-seconds.
        Returns:
        the interval
      • intervalTipText

        public String intervalTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setEventName

        public void setEventName​(String value)
        Sets the name to use for the events.
        Parameters:
        value - the name
      • getEventName

        public String getEventName()
        Returns the name to use for the events.
        Returns:
        the name
      • eventNameTipText

        public String eventNameTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • startStream

        @GET
        @Produces("text/event-stream")
        public void startStream​(@Context
                                javax.ws.rs.sse.SseEventSink eventSink,
                                @Context
                                javax.ws.rs.sse.Sse sse)