Package adams.scripting.command.basic
Class StopEngine
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,RemoteCommand,RemoteCommandWithErrorMessage,RemoteCommandWithResponse,Serializable
public class StopEngine extends AbstractCommandWithResponse
Simply stops the scripting engine, either the one handling the request or the response. Useful for terminating the receiving scripting engine once the last command has been processed.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStopEngine.EngineTypeThe type of engine to stop.
-
Field Summary
Fields Modifier and Type Field Description protected StopEngine.EngineTypem_Typethe type.-
Fields inherited from class adams.scripting.command.AbstractCommandWithResponse
m_ErrorMessage, m_ResponseConnection
-
Fields inherited from class adams.scripting.command.AbstractCommand
m_RemoteScriptingEngineHandler, m_Request
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
Fields inherited from interface adams.scripting.command.RemoteCommand
KEY_COMMAND, KEY_TYPE, VALUE_REQUEST, VALUE_RESPONSE
-
-
Constructor Summary
Constructors Constructor Description StopEngine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.byte[]getRequestPayload()Returns the payload of the request, if any.Object[]getRequestPayloadObjects()Returns the objects that represent the request payload.byte[]getResponsePayload()Returns the payload of the response, if any.Object[]getResponsePayloadObjects()Returns the objects that represent the response payload.StopEngine.EngineTypegetType()Returns the type of engine to stop.StringglobalInfo()Returns a string describing the object.voidhandleRequest(RemoteScriptingEngine engine, RemoteCommandProcessor processor, RequestHandler handler)Handles the request.voidhandleResponse(RemoteScriptingEngine engine, ResponseHandler handler)Handles the response.voidsetRequestPayload(byte[] value)Sets the payload for the request.voidsetResponsePayload(byte[] value)Sets the payload for the response.voidsetType(StopEngine.EngineType value)Sets the type of engine to stop.StringtypeTipText()Returns the tip text for this property.-
Methods inherited from class adams.scripting.command.AbstractCommandWithResponse
afterSendResponse, assembleResponse, assembleResponseHeader, beforeSendResponse, doHandleRequest, getDefaultResponseConnection, getErrorMessage, getResponseConnection, hasErrorMessage, parse, prepareResponsePayload, responseConnectionTipText, setResponseConnection, toString
-
Methods inherited from class adams.scripting.command.AbstractCommand
afterSendRequest, assembleRequest, assembleRequestHeader, beforeSendRequest, getRemoteScriptingEngineHandler, initialize, isRequest, prepareRequestPayload, setRemoteScriptingEngineHandler, setRequest
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine
-
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.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
Methods inherited from interface adams.scripting.command.RemoteCommand
afterSendRequest, assembleRequest, beforeSendRequest, getRemoteScriptingEngineHandler, isRequest, setRemoteScriptingEngineHandler, setRequest
-
-
-
-
Field Detail
-
m_Type
protected StopEngine.EngineType m_Type
the type.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractCommandWithResponse
-
setType
public void setType(StopEngine.EngineType value)
Sets the type of engine to stop.- Parameters:
value- the type
-
getType
public StopEngine.EngineType getType()
Returns the type of engine to stop.- Returns:
- the type
-
typeTipText
public String typeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setRequestPayload
public void setRequestPayload(byte[] value)
Sets the payload for the request.- Parameters:
value- the payload
-
getRequestPayload
public byte[] getRequestPayload()
Returns the payload of the request, if any.- Returns:
- the payload
-
getRequestPayloadObjects
public Object[] getRequestPayloadObjects()
Returns the objects that represent the request payload.- Returns:
- the objects
-
handleRequest
public void handleRequest(RemoteScriptingEngine engine, RemoteCommandProcessor processor, RequestHandler handler)
Handles the request.- Specified by:
handleRequestin interfaceRemoteCommand- Overrides:
handleRequestin classAbstractCommand- Parameters:
engine- the remote engine handling the requestprocessor- the processor for formatting/parsinghandler- for handling the request
-
setResponsePayload
public void setResponsePayload(byte[] value)
Sets the payload for the response.- Parameters:
value- the payload
-
getResponsePayload
public byte[] getResponsePayload()
Returns the payload of the response, if any.- Returns:
- the payload
-
getResponsePayloadObjects
public Object[] getResponsePayloadObjects()
Returns the objects that represent the response payload.- Returns:
- the objects
-
handleResponse
public void handleResponse(RemoteScriptingEngine engine, ResponseHandler handler)
Handles the response.- Specified by:
handleResponsein interfaceRemoteCommandWithResponse- Overrides:
handleResponsein classAbstractCommandWithResponse- Parameters:
engine- the remote engine handling the responsehandler- for handling the response
-
-