|
1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.soda.dk.core.EscObject
org.eclipse.soda.dk.device.Control
org.eclipse.soda.dk.command.Command
public class Command
The Command class implements the CommandService interface.
Control,
CommandService,
ControlService,
ErrorListener,
MeasurementListener,
MessageHandler,
SignalListener| Field Summary |
|---|
| Fields inherited from class org.eclipse.soda.dk.device.Control |
|---|
EXCEPTION_READ_FAILED_RESOURCE, SETVALUEEXCEPTION_RESOURCE |
| 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, INTEGER_TABLE, KEY_KEY, LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_TRACE, LOG_WARNING, PREFIX_KEY, 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 |
| Constructor Summary | |
|---|---|
Command(java.lang.String key)
Constructs an Command object using the input parameter(s). |
|
| Method Summary | |
|---|---|
void |
addCommandListener(CommandListener commandListener)
Adds the specified listener to receive listener notification. |
void |
execute()
Perform the execute action method. |
void |
execute(java.lang.Object data)
Perform the execute action method. |
void |
fireCommandExecuted(CommandListener commandListener,
java.lang.Object timestamp)
Perform the fireCommandExecuted action method. |
void |
fireCommandExecuted(CommandListener commandListener,
java.lang.Object timestamp,
java.lang.Object data)
Perform the fireCommandExecuted action method. |
protected void |
fireErrorOccurred(CommandListener commandListener,
java.lang.Object timestamp,
java.lang.Object data)
Fire error occurred with the specified command listener, timestamp and data parameters. |
void |
fireErrorOccurred(java.lang.Object timestamp,
java.lang.Object data)
Fire error occurred with the specified timestamp and data parameters. |
CommandListener |
getCommandListener()
Gets the CommandListener commandListener property value. |
void |
measurementChanged(MeasurementService source,
java.lang.Object timestamp,
java.lang.Object newValue,
java.lang.Object oldValue)
This method is fired to all Listeners each time the value of the measurement changes. |
void |
removeCommandListener(CommandListener commandListener)
Removes the specified listener from receiving listener notification. |
protected void |
reportError(int errorNumber,
java.lang.Throwable error,
java.lang.Object[] errorObjects)
Report error with the specified error number, error and error objects parameters. |
void |
setCommandListener(CommandListener commandListener)
Sets the commandListener. |
void |
signalOccurred(SignalService source,
java.lang.Object timestamp,
java.lang.Object data)
This method is fired to all Listeners each time the signal triggerred. |
| Methods inherited from class org.eclipse.soda.dk.device.Control |
|---|
attemptRecoveryFromError, equalsValue, errorOccurred, getCodeKey, getErrorSeverity, getKey, getQualifiedKey, getResource, setKey, setQualifiedKey, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.soda.dk.device.service.ControlService |
|---|
getKey |
| Methods inherited from interface org.eclipse.soda.dk.transport.service.ErrorListener |
|---|
errorOccurred |
| Methods inherited from interface org.eclipse.soda.dk.transport.service.ErrorListener |
|---|
errorOccurred |
| Constructor Detail |
|---|
public Command(java.lang.String key)
Command object using the input parameter(s).
java.lang.String
key - The key (String) parameter.| Method Detail |
|---|
public void addCommandListener(CommandListener commandListener)
org.eclipse.soda.dk.command.service.CommandListener
listener to be added.
addCommandListener in interface CommandServicecommandListener - The command listener (CommandListener) parameter.CommandService.addCommandListener(org.eclipse.soda.dk.command.service.CommandListener),
getCommandListener(),
removeCommandListener(CommandListener),
setCommandListener(CommandListener)public void execute()
execute in interface CommandServiceCommandService.execute(),
execute(Object)public void execute(java.lang.Object data)
java.lang.Object
execute in interface CommandServicedata - The data (Object) parameter.CommandService.execute(),
execute()
public void fireCommandExecuted(CommandListener commandListener,
java.lang.Object timestamp,
java.lang.Object data)
java.lang.Object
java.lang.Object
commandListener - The command listener (CommandListener) parameter.timestamp - The timestamp (Object) parameter.data - The data (Object) parameter.fireCommandExecuted(CommandListener,Object)
public void fireCommandExecuted(CommandListener commandListener,
java.lang.Object timestamp)
java.lang.Object
commandListener - The command listener (CommandListener) parameter.timestamp - The timestamp (Object) parameter.fireCommandExecuted(CommandListener,Object,Object)
public void fireErrorOccurred(java.lang.Object timestamp,
java.lang.Object data)
timestamp - The timestamp (Object) parameter.data - The data (Object) parameter.fireErrorOccurred(CommandListener,Object,Object)
protected void fireErrorOccurred(CommandListener commandListener,
java.lang.Object timestamp,
java.lang.Object data)
commandListener - The command listener (CommandListener) parameter.timestamp - The timestamp (Object) parameter.data - The data (Object) parameter.fireErrorOccurred(Object,Object)public CommandListener getCommandListener()
CommandListener commandListener property value.
CommandListener)
value.addCommandListener(CommandListener),
removeCommandListener(CommandListener),
setCommandListener(CommandListener)
public void measurementChanged(MeasurementService source,
java.lang.Object timestamp,
java.lang.Object newValue,
java.lang.Object oldValue)
measurementChanged in interface MeasurementListenersource - The source (MeasurementService) parameter.timestamp - The timestamp (Object) parameter.newValue - The new value (Object) parameter.oldValue - The old value (Object) parameter.public void removeCommandListener(CommandListener commandListener)
org.eclipse.soda.dk.command.service.CommandListener
listener to be removed.
removeCommandListener in interface CommandServicecommandListener - The command listener (CommandListener) parameter.CommandService.removeCommandListener(org.eclipse.soda.dk.command.service.CommandListener),
addCommandListener(CommandListener),
getCommandListener(),
setCommandListener(CommandListener)
protected void reportError(int errorNumber,
java.lang.Throwable error,
java.lang.Object[] errorObjects)
throws java.lang.RuntimeException
reportError in class EscObjecterrorNumber - The error number (int) parameter.error - The error (Throwable) parameter.errorObjects - The error objects (Object[]) parameter.
java.lang.RuntimeException - Runtime Exception.EscObject.handleStaticError(String),
EscObject.attemptRecoveryFromError(int,Throwable),
EscObject.handleError(Throwable,int),
EscObject.handleError(Throwable,int,Object),
EscObject.handleError(Throwable,int,Object[])public void setCommandListener(CommandListener commandListener)
commandListener - The command listener (CommandListener) parameter.addCommandListener(CommandListener),
getCommandListener(),
removeCommandListener(CommandListener)
public void signalOccurred(SignalService source,
java.lang.Object timestamp,
java.lang.Object data)
signalOccurred in interface SignalListenersource - The source (SignalService) parameter.timestamp - The timestamp (Object) parameter.data - The data (Object) parameter.fireErrorOccurred(Object,Object),
fireErrorOccurred(CommandListener,Object,Object)
|
1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||