org.eclipse.soda.dk.command
Class MessageCommand
java.lang.Object
org.eclipse.soda.dk.core.EscObject
org.eclipse.soda.dk.device.Control
org.eclipse.soda.dk.command.Command
org.eclipse.soda.dk.command.DeviceCommand
org.eclipse.soda.dk.command.SimpleMessageCommand
org.eclipse.soda.dk.command.MessageCommand
- All Implemented Interfaces:
- CommandService, MessageHandler, ControlService, DeviceControl, MeasurementListener, MultiplexMeasurementListener, MultiplexSignalListener, SignalListener, ErrorListener, MessageListener, MultiplexMessageListener, ResponseListener
- Direct Known Subclasses:
- DataCommand
public class MessageCommand
- extends SimpleMessageCommand
- implements MessageHandler
The MessageCommand class implements the CommandService interface. This command class implements a command with a message that is sent to the device and the message can be received from the device. This class should not be used if the message
contains a parameter or a command parameter has been specified.
- Since:
- 1.0
- Version:
- 1.2.0
- See Also:
Command,
Control,
DeviceCommand,
CommandService,
ControlService,
DeviceControl,
ErrorListener,
MeasurementListener,
MessageService,
MessageHandler,
SignalListener,
TransportListener
| Fields inherited from class org.eclipse.soda.dk.core.EscObject |
CLONE_EXCEPTION_RESOURCE, EMPTY_BYTES, EMPTY_STRING, ERROR_OCCURRED_EXCEPTION_RESOURCE, ID_FILTER_KEY, ID_KEY, ID_KEY_ANY, ID_NAME_KEY, INTEGER_TABLE, INTEGER_TABLE_SIZE, KEY_KEY, LOG_DEBUG, LOG_DEFAULT, LOG_ERROR, LOG_INFO, LOG_LEVEL_KEY, LOG_TRACE, LOG_WARNING, LONG_TABLE, LONG_TABLE_SIZE, PREFIX_KEY, READONLY_EMPTY_COLLECTION, READONLY_EMPTY_LIST, READONLY_EMPTY_MAP, RESOURCE_BUNDLE, SLEEP_EXCEPTION_RESOURCE, SYSTEM_INFO_RESOURCE, TO_STRING_CONFIGURATION_KEYS, TRACE_LEVEL_HIGH, TRACE_LEVEL_LOW, TRACE_LEVEL_MAX, TRACE_LEVEL_MIN, TRACE_LEVEL_NONE, TRACE_LEVEL_NORMAL, TRACELEVEL_KEY, UNKNOWN_ERROR_RESOURCE, Unmodifiable |
|
Constructor Summary |
MessageCommand(java.lang.String key,
MessageService message)
Constructs an MessageCommand object using the input parameter(s). |
|
Method Summary |
void |
messageReceived(TransportService transportService,
java.lang.Object timestamp,
ChannelService channel,
MessageService message)
Message received with the specified transport service, timestamp, channel and message parameters. |
void |
messageReceived(TransportService transportService,
java.lang.Object timestamp,
MessageService message)
This API will be called each time the TransportService receives a valid message. |
void |
responseReceived(TransportService transportService,
ChannelService channel,
java.lang.Object data)
Response received with the specified transport service, channel and data parameters. |
| Methods inherited from class org.eclipse.soda.dk.command.Command |
addCommandListener, execute, execute, fireCommandExecuted, fireCommandExecuted, fireCommandExecuted, fireCommandExecuted, fireErrorOccurred, fireErrorOccurred, getCommandListener, measurementChanged, measurementChanged, removeCommandListener, reportError, setCommandListener, signalOccurred, signalOccurred |
| Methods inherited from class org.eclipse.soda.dk.device.Control |
attemptRecoveryFromError, equalsValue, errorOccurred, findMethod, getCodeKey, getErrorSeverity, getKey, getQualifiedKey, getResource, setKey, setQualifiedKey, toString |
| Methods inherited from class org.eclipse.soda.dk.core.EscObject |
createBoolean, createDefaultLogService, createException, createException, createInteger, createIntegerTable, createLong, createLongTable, createNumber, format, getBoolean, getByte, getChar, getConfigurationService, getCurrentTimestamp, getDefaultLogService, getDefaultResource, getDouble, getFloat, getId, getIdName, getInt, getLoadLibraryName, getLogDetails, getLogDetails, getLogDetails0, getLogDetails1, getLogDetails2, getLogDetails3, getLogDetails4, getLogDetails5, getLogDetails6, getLogDetails7, getLogLevel, getLogService, getLong, getObject, getOutputName, getReadOnlyEmptyCollection, getReadOnlyEmptyList, getReadOnlyEmptyMap, getShort, getSimpleClassName, getStaticBoolean, getStaticByte, getStaticChar, getStaticDouble, getStaticFloat, getStaticInt, getStaticLong, getStaticObject, getStaticShort, getStaticString, getString, getTraceLevel, getVmLibraryVersion, handleError, handleError, handleError, handleError, handleErrorInternal, handleStaticError, handleStaticException, isBackward, isDebug, isLogging, isTrace, isUnmodifiable, loadService, log, log, log, report, report, report, report, report, report, report, reportSystemInfo, setBackward, setDebug, setDefaultLogService, setLogService, setTraceLevel, setUnmodifiable, shouldLog, sleep, startupEscStatic, toStringConfigurationKeys, toStringInfo |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MessageCommand
public MessageCommand(java.lang.String key,
MessageService message)
- Constructs an
MessageCommand object using the input parameter(s).
- Parameters:
key - The key (String) parameter.message - The message (MessageService) parameter.
messageReceived
public void messageReceived(TransportService transportService,
java.lang.Object timestamp,
ChannelService channel,
MessageService message)
- Message received with the specified transport service, timestamp, channel and message parameters.
- Specified by:
messageReceived in interface MultiplexMessageListener
- Parameters:
transportService - The transport service (TransportService) parameter.timestamp - The time stamp (Object) parameter.channel - The channel (ChannelService) parameter.message - The message (MessageService) parameter.- Since:
- 1.2
- See Also:
messageReceived(TransportService,Object,MessageService),
responseReceived(TransportService,ChannelService,Object)
messageReceived
public void messageReceived(TransportService transportService,
java.lang.Object timestamp,
MessageService message)
- This API will be called each time the TransportService receives a valid message. Since other notifications are blocked until this method returns, implementors of this method should:
- Not cause the device or transport to be blocked (e.g. calling read on a measurement).
- Handle this call quickly and return.
- Specified by:
messageReceived in interface MessageListener
- Parameters:
transportService - The transport service (TransportService) parameter.timestamp - The time stamp (Object) parameter.message - The message (MessageService) parameter.- See Also:
messageReceived(TransportService,Object,ChannelService,MessageService),
responseReceived(TransportService,ChannelService,Object)
responseReceived
public void responseReceived(TransportService transportService,
ChannelService channel,
java.lang.Object data)
- Response received with the specified transport service, channel and data parameters.
- Parameters:
transportService - The transport service (TransportService) parameter.channel - The channel (ChannelService) parameter.data - The data (Object) parameter.- Since:
- 1.2
- See Also:
messageReceived(TransportService,Object,ChannelService,MessageService),
messageReceived(TransportService,Object,MessageService)
Copyright (c) 2009 IBM. See license in Legal section.