Class SubPub
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.standalone.subprocessevent.AbstractSubProcessEventTrigger<Object,Object>
-
- adams.flow.standalone.subprocessevent.SubPub
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,PublicationListener
,SubProcessEventTrigger<Object,Object>
,Serializable
public class SubPub extends AbstractSubProcessEventTrigger<Object,Object> implements PublicationListener
Subscribes to the specified 'subscribe' queue to receive data from and publishes the processed data to the 'publish' queue.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected PublishSubscribeHandler
m_PublishHandler
the pub/sub handler for publishing.protected StorageName
m_PublishStorageName
the name of the queue in the internal storage to publish to.protected PublishSubscribeHandler
m_SubscribeHandler
the pub/sub handler for subscribing.protected StorageName
m_SubscribeStorageName
the name of the queue in the internal storage to subscribe to.-
Fields inherited from class adams.flow.standalone.subprocessevent.AbstractSubProcessEventTrigger
m_BusyTimeout, m_Owner
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description SubPub()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dataPublished(PublicationEvent e)
Gets called when data is being published.void
defineOptions()
Adds options to the internal list of options.StorageName
getPublishStorageName()
Returns the name for the queue in the internal storage to publish to.String
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.StorageName
getSubscribeStorageName()
Returns the name for the queue in the internal storage to subscribe to.String
globalInfo()
Returns a string describing the object.String
publishStorageNameTipText()
Returns the tip text for this property.void
setPublishStorageName(StorageName value)
Sets the name for the queue in the internal storage to publish to.void
setSubscribeStorageName(StorageName value)
Sets the name for the queue in the internal storage to subscribe to.String
setUp(SubProcessEvent owner)
Configures the trigger.String
subscribeStorageNameTipText()
Returns the tip text for this property.void
wrapUp()
Wraps up the trigger.-
Methods inherited from class adams.flow.standalone.subprocessevent.AbstractSubProcessEventTrigger
busyTimeoutTipText, getBusyTimeout, process, setBusyTimeout
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_SubscribeStorageName
protected StorageName m_SubscribeStorageName
the name of the queue in the internal storage to subscribe to.
-
m_SubscribeHandler
protected transient PublishSubscribeHandler m_SubscribeHandler
the pub/sub handler for subscribing.
-
m_PublishStorageName
protected StorageName m_PublishStorageName
the name of the queue in the internal storage to publish to.
-
m_PublishHandler
protected transient PublishSubscribeHandler m_PublishHandler
the pub/sub handler for publishing.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- 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 interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractSubProcessEventTrigger<Object,Object>
-
setSubscribeStorageName
public void setSubscribeStorageName(StorageName value)
Sets the name for the queue in the internal storage to subscribe to.- Parameters:
value
- the name
-
getSubscribeStorageName
public StorageName getSubscribeStorageName()
Returns the name for the queue in the internal storage to subscribe to.- Returns:
- the name
-
subscribeStorageNameTipText
public String subscribeStorageNameTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPublishStorageName
public void setPublishStorageName(StorageName value)
Sets the name for the queue in the internal storage to publish to.- Parameters:
value
- the name
-
getPublishStorageName
public StorageName getPublishStorageName()
Returns the name for the queue in the internal storage to publish to.- Returns:
- the name
-
publishStorageNameTipText
public String publishStorageNameTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractSubProcessEventTrigger<Object,Object>
- Returns:
- null if no info available, otherwise short string
-
setUp
public String setUp(SubProcessEvent owner)
Configures the trigger.- Specified by:
setUp
in interfaceSubProcessEventTrigger<Object,Object>
- Overrides:
setUp
in classAbstractSubProcessEventTrigger<Object,Object>
- Parameters:
owner
- the owning event- Returns:
- null if successfully configured, otherwise error message
-
dataPublished
public void dataPublished(PublicationEvent e)
Gets called when data is being published.- Specified by:
dataPublished
in interfacePublicationListener
- Parameters:
e
- the data event
-
wrapUp
public void wrapUp()
Wraps up the trigger.- Specified by:
wrapUp
in interfaceSubProcessEventTrigger<Object,Object>
- Overrides:
wrapUp
in classAbstractSubProcessEventTrigger<Object,Object>
-
-