Package adams.scripting.responsehandler
Class AbstractResponseHandler
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.scripting.responsehandler.AbstractResponseHandler
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,ResponseHandler,Serializable
- Direct Known Subclasses:
AbstractTabResponseHandler,AdvancedTab.InspectionResponseHandler,CallableActorsHandler,CommandDumperHandler,LoggingHandler,MultiHandler,NullHandler,SimpleLogPanelResponseHandler
public abstract class AbstractResponseHandler extends AbstractOptionHandler implements ResponseHandler
Ancestor for response handlers.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanm_Enabledwhether the handler is enabled.protected RemoteScriptingEnginem_Ownerthe 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 AbstractResponseHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.StringenabledTipText()Returns the tip text for this property.booleangetEnabled()Returns whether the handler is enabled.RemoteScriptingEnginegetOwner()Returns the owning engine.static booleaninsertHandler(Object source, AbstractApplicationFrame app, ResponseHandler handler)For inserting a response handler into the scripting engine.voidsetEnabled(boolean value)Sets whether the handler is enabled.voidsetOwner(RemoteScriptingEngine value)Sets the owning engine.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, 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
-
Methods inherited from interface adams.scripting.responsehandler.ResponseHandler
responseFailed, responseSuccessful
-
-
-
-
Field Detail
-
m_Owner
protected RemoteScriptingEngine m_Owner
the owner.
-
m_Enabled
protected boolean m_Enabled
whether the handler is enabled.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
setOwner
public void setOwner(RemoteScriptingEngine value)
Sets the owning engine.- Specified by:
setOwnerin interfaceResponseHandler- Parameters:
value- the owner
-
getOwner
public RemoteScriptingEngine getOwner()
Returns the owning engine.- Specified by:
getOwnerin interfaceResponseHandler- Returns:
- the owner, null if none set
-
setEnabled
public void setEnabled(boolean value)
Sets whether the handler is enabled.- Parameters:
value- true if enabled
-
getEnabled
public boolean getEnabled()
Returns whether the handler is enabled.- Returns:
- true if enabled
-
enabledTipText
public String enabledTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
insertHandler
public static boolean insertHandler(Object source, AbstractApplicationFrame app, ResponseHandler handler)
For inserting a response handler into the scripting engine.- Parameters:
source- the callerapp- the application frame to updatehandler- the handler to insert- Returns:
- true if not present and therefore inserted
-
-