Class RegisterWorker
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.scripting.command.AbstractCommand
-
- adams.scripting.command.distributed.RegisterWorker
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,RemoteCommand
,Serializable
public class RegisterWorker extends AbstractCommand
Registers aWorkerScriptingEngine
with a main engine.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Connection
m_Connection
the connection to use for the slave.-
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 RegisterWorker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
doHandleRequest(RemoteScriptingEngine engine, RemoteCommandProcessor processor)
Handles the request.Connection
getConnection()
Retrieves the currently set connection.byte[]
getRequestPayload()
Returns the payload of the request, if any.Object[]
getRequestPayloadObjects()
Returns the objects that represent the request payload.String
globalInfo()
Returns a string describing the object.void
setConnection(Connection value)
Sets the connection to use as payload.void
setRequestPayload(byte[] value)
Sets the payload for the request.-
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, defineOptions, 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, defineOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_Connection
protected Connection m_Connection
the connection to use for the slave.
-
-
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
-
setConnection
public void setConnection(Connection value)
Sets the connection to use as payload.- Parameters:
value
- the connection
-
getConnection
public Connection getConnection()
Retrieves the currently set connection.- Returns:
- the connection
-
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
-
doHandleRequest
protected String doHandleRequest(RemoteScriptingEngine engine, RemoteCommandProcessor processor)
Handles the request.- Specified by:
doHandleRequest
in classAbstractCommand
- Parameters:
engine
- the remote engine handling the request- Returns:
- null if successful, otherwise error message
-
-