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_Connectionsthe 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 StringcheckRequest(RemoteCommand cmd)Hook method that checks the request command and setup for sending it.protected StringcheckResponse(RemoteCommand cmd)Hook method that checks the response command and setup for sending it.StringconnectionsTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected StringdoSendRequest(RemoteCommand cmd, RemoteCommandProcessor processor)Sends the request command.protected StringdoSendResponse(RemoteCommand cmd, RemoteCommandProcessor processor)Sends the response command.Connection[]getConnections()Returns the connections to use.StringglobalInfo()Returns a string describing the object.voidsetConnections(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:
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 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:
checkRequestin 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:
doSendRequestin 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:
checkResponsein 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:
doSendResponsein classAbstractConnection- Parameters:
cmd- the command to sendprocessor- the processor for formatting/parsing- Returns:
- null if successful, otherwise error message
-
-