Package adams.flow.standalone.rats.input
Class RedisAction
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.standalone.rats.input.AbstractRatInput
-
- adams.flow.standalone.rats.input.RedisAction
-
- All Implemented Interfaces:
adams.core.AdditionalInformationHandler,adams.core.CleanUpHandler,adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.QuickInfoSupporter,adams.core.ShallowCopySupporter<AbstractRatInput>,adams.core.SizeOfHandler,adams.core.Stoppable,adams.core.StoppableWithFeedback,RatInput,Serializable
public class RedisAction extends AbstractRatInput
Executes the specified Redis action.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractRedisActionm_Actionthe name of the action.protected RedisConnectionm_Connectionthe redis connection to use.protected Objectm_Datathe received data.-
Fields inherited from class adams.flow.standalone.rats.input.AbstractRatInput
m_LoggingPrefix, m_Owner, m_ReceptionInterrupted, m_ReceptionRunning, m_Stopped
-
-
Constructor Summary
Constructors Constructor Description RedisAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringactionTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected StringdoReceive()Performs the actual reception of data.Classgenerates()Returns the type of data this scheme generates.AbstractRedisActiongetAction()Returns the name of the action.StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.StringglobalInfo()Returns a string describing the object.booleanhasPendingOutput()Checks whether any output can be collected.Objectoutput()Returns the received data.voidsetAction(AbstractRedisAction value)Sets the name of the action.StringsetUp()Hook method for performing checks at setup time.-
Methods inherited from class adams.flow.standalone.rats.input.AbstractRatInput
canReceive, check, cleanUp, configureLogger, doWait, getAdditionalInformation, getFullName, getOwner, getQueue, getReceptionInterrupted, handleException, initialize, initReception, interruptReception, isReceptionRunning, isStopped, receive, setOwner, shallowCopy, shallowCopy, stopExecution, updatePrefix
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Action
protected AbstractRedisAction m_Action
the name of the action.
-
m_Connection
protected transient RedisConnection m_Connection
the redis connection to use.
-
m_Data
protected transient Object m_Data
the received data.
-
-
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
-
setAction
public void setAction(AbstractRedisAction value)
Sets the name of the action.- Parameters:
value- the name
-
getAction
public AbstractRedisAction getAction()
Returns the name of the action.- Returns:
- the name
-
actionTipText
public String actionTipText()
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 actor, which will be displayed in the GUI.- Specified by:
getQuickInfoin interfaceadams.core.QuickInfoSupporter- Overrides:
getQuickInfoin classAbstractRatInput- Returns:
- null if no info available, otherwise short string
-
generates
public Class generates()
Returns the type of data this scheme generates.- Specified by:
generatesin interfaceRatInput- Specified by:
generatesin classAbstractRatInput- Returns:
- the type of data
-
setUp
public String setUp()
Hook method for performing checks at setup time.- Specified by:
setUpin interfaceRatInput- Overrides:
setUpin classAbstractRatInput- Returns:
- null if successful, otherwise error message
-
doReceive
protected String doReceive()
Performs the actual reception of data.- Specified by:
doReceivein classAbstractRatInput- Returns:
- null if successful, otherwise error message
-
hasPendingOutput
public boolean hasPendingOutput()
Checks whether any output can be collected.- Specified by:
hasPendingOutputin interfaceRatInput- Specified by:
hasPendingOutputin classAbstractRatInput- Returns:
- true if output available
-
output
public Object output()
Returns the received data.- Specified by:
outputin interfaceRatInput- Specified by:
outputin classAbstractRatInput- Returns:
- the data
-
-