Package adams.scripting.command.basic
Class Restart
-
- All Implemented Interfaces:
ClassCrossReference
,CrossReference
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,RemoteCommand
,Serializable
public class Restart extends AbstractCommandWithFlowStopping implements ClassCrossReference
Attempts to restart the remote ADAMS instance.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_MoreMemory
whether to restart with more memory.-
Fields inherited from class adams.scripting.command.basic.AbstractCommandWithFlowStopping
m_StopFlows, m_TimeOut
-
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 Restart()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected String
doHandleRequest(RemoteScriptingEngine engine, RemoteCommandProcessor processor)
Handles the request.Class[]
getClassCrossReferences()
Returns the cross-referenced classes.boolean
getMoreMemory()
Returns whether to restart with more memory.byte[]
getRequestPayload()
Always zero-length array.Object[]
getRequestPayloadObjects()
Returns the objects that represent the request payload.String
globalInfo()
Returns a string describing the object.String
moreMemoryTipText()
Returns the tip text for this property.void
setMoreMemory(boolean value)
Sets whether to restart with more memory.void
setRequestPayload(byte[] value)
Ignored.-
Methods inherited from class adams.scripting.command.basic.AbstractCommandWithFlowStopping
createFlowID, getStopFlows, getTimeOut, setStopFlows, setTimeOut, stopFlows, stopFlowsTipText, timeOutTipText
-
Methods inherited from class adams.scripting.command.AbstractCommand
afterSendRequest, assembleRequest, assembleRequestHeader, beforeSendRequest, getRemoteScriptingEngineHandler, handleRequest, initialize, isRequest, parse, prepareRequestPayload, setRemoteScriptingEngineHandler, setRequest, toString
-
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
-
-
-
-
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
-
getClassCrossReferences
public Class[] getClassCrossReferences()
Returns the cross-referenced classes.- Specified by:
getClassCrossReferences
in interfaceClassCrossReference
- Returns:
- the classes
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractCommandWithFlowStopping
-
setMoreMemory
public void setMoreMemory(boolean value)
Sets whether to restart with more memory.- Parameters:
value
- true if to restart with more memory
-
getMoreMemory
public boolean getMoreMemory()
Returns whether to restart with more memory.- Returns:
- true if to restart with more memory
-
moreMemoryTipText
public String moreMemoryTipText()
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)
Ignored.- Specified by:
setRequestPayload
in interfaceRemoteCommand
- Parameters:
value
- the payload
-
getRequestPayload
public byte[] getRequestPayload()
Always zero-length array.- Specified by:
getRequestPayload
in interfaceRemoteCommand
- Returns:
- the payload
-
getRequestPayloadObjects
public Object[] getRequestPayloadObjects()
Returns the objects that represent the request payload.- Specified by:
getRequestPayloadObjects
in interfaceRemoteCommand
- Returns:
- the objects
-
doHandleRequest
protected String doHandleRequest(RemoteScriptingEngine engine, RemoteCommandProcessor processor)
Handles the request.- Specified by:
doHandleRequest
in classAbstractCommand
- Parameters:
engine
- the remote engine handling the requestprocessor
- the processor for formatting/parsing- Returns:
- null if successful, otherwise error message
-
-