Package adams.scripting.connection
Class Multicast
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.scripting.connection.AbstractConnection
-
- adams.scripting.connection.Multicast
-
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,Connection
,Serializable
,Comparable<Connection>
public class Multicast extends AbstractConnection
Sends the same command to all connections.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Connection[]
m_Connections
the connections to balance.-
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 Multicast()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
checkRequest(RemoteCommand cmd)
Hook method that checks the request command and setup for sending it.protected String
checkResponse(RemoteCommand cmd)
Hook method that checks the response command and setup for sending it.String
connectionsTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.protected String
doSendRequest(RemoteCommand cmd, RemoteCommandProcessor processor)
Sends the request command.protected String
doSendResponse(RemoteCommand cmd, RemoteCommandProcessor processor)
Sends the response command.Connection[]
getConnections()
Returns the connections to use.String
globalInfo()
Returns a string describing the object.void
setConnections(Connection[] value)
Sets the connections to use.-
Methods inherited from class adams.scripting.connection.AbstractConnection
cleanUp, compareTo, equals, getQuickInfo, sendRequest, sendResponse, toString
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, 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, 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.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_Connections
protected Connection[] m_Connections
the connections to balance.
-
-
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
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setConnections
public void setConnections(Connection[] value)
Sets the connections to use.- Parameters:
value
- the connections
-
getConnections
public Connection[] getConnections()
Returns the connections to use.- Returns:
- the connections
-
connectionsTipText
public String connectionsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
checkRequest
protected String checkRequest(RemoteCommand cmd)
Hook method that checks the request command and setup for sending it.- Overrides:
checkRequest
in classAbstractConnection
- Parameters:
cmd
- the command to check- Returns:
- null if successful, otherwise error message
-
doSendRequest
protected String doSendRequest(RemoteCommand cmd, RemoteCommandProcessor processor)
Sends the request command.- Specified by:
doSendRequest
in classAbstractConnection
- Parameters:
cmd
- the command to sendprocessor
- the processor for formatting/parsing- Returns:
- null if successful, otherwise error message
-
checkResponse
protected String checkResponse(RemoteCommand cmd)
Hook method that checks the response command and setup for sending it.- Overrides:
checkResponse
in classAbstractConnection
- Parameters:
cmd
- the command to check- Returns:
- null if successful, otherwise error message
-
doSendResponse
protected String doSendResponse(RemoteCommand cmd, RemoteCommandProcessor processor)
Sends the response command.- Specified by:
doSendResponse
in classAbstractConnection
- Parameters:
cmd
- the command to sendprocessor
- the processor for formatting/parsing- Returns:
- null if successful, otherwise error message
-
-