Package adams.flow.rest.sse
Class SSEQueueBroadcastResource
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.rest.AbstractRESTPlugin
-
- adams.flow.rest.AbstractRESTPluginWithFlowContext
-
- adams.flow.rest.sse.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 Stringm_EventNamethe name of the event.protected intm_Intervalthe poll interval in msec.protected adams.flow.control.StorageNamem_StorageNamethe name of the queue in the internal storage.-
Fields inherited from class adams.flow.rest.AbstractRESTPluginWithFlowContext
m_FlowContext
-
-
Constructor Summary
Constructors Constructor Description SSEQueueBroadcastResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.StringeventNameTipText()Returns the tip text for this property.StringgetEventName()Returns the name to use for the events.intgetInterval()Returns the polling interval in milli-seconds.adams.flow.control.StorageNamegetStorageName()Returns the name for the queue in the internal storage.StringglobalInfo()Returns a string describing the object.StringintervalTipText()Returns the tip text for this property.voidsetEventName(String value)Sets the name to use for the events.voidsetInterval(int value)Sets the polling interval in seconds.voidsetStorageName(adams.flow.control.StorageName value)Sets the name for the queue in the internal storage.voidsetStorageName(String value)Sets the name for the queue in the internal storage.voidstartStream(javax.ws.rs.sse.SseEventSink eventSink, javax.ws.rs.sse.Sse sse)StringstorageNameTipText()Returns the tip text for this property.-
Methods inherited from class adams.flow.rest.AbstractRESTPluginWithFlowContext
getFlowContext, setFlowContext
-
Methods inherited from class adams.flow.rest.AbstractRESTPlugin
getAdditionalInformation
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
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.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Specified by:
globalInfoin classadams.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:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classadams.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)
-
-