1.0.0

org.eclipse.soda.dk.command.service
Interface CommandService

All Superinterfaces:
ControlService
All Known Implementing Classes:
Command, Commands, DataCommand, DeviceCommand, MeasurementCommand, MessageCommand, MethodCommand, ParameterCommand, SimpleDataCommand, SimpleMeasurementCommand, SimpleMessageCommand, SimpleParameterCommand, SimpleTransformCommand, SleepCommand, StateCommand, TransformCommand

public interface CommandService
extends ControlService

The CommandService interface defines the CommandService concept. A CommandService is a logical representation of a message which is sent to a hardware Device, instructing it to do something. The execute methods are used in order to send the CommandService. An application may register interest by using the CommandListener interface, and be notified whenever the CommandService is sent.

Version:
1.0.0
See Also:
Command, CommandListener, ControlService

Method Summary
 void addCommandListener(CommandListener commandListener)
          Adds the specified listener to receive command listener notification.
 void execute()
          Execute the command, causing it to be sent to the target hardware device.
 void execute(java.lang.Object data)
          Execute the command, and fill in any data fields with the value held within the data argument.
 void removeCommandListener(CommandListener commandListener)
          Removes the specified listener from receiving listener notification.
 
Methods inherited from interface org.eclipse.soda.dk.device.service.ControlService
getKey
 

Method Detail

addCommandListener

void addCommandListener(CommandListener commandListener)
Adds the specified listener to receive command listener notification. This method adds a Listener to the list of current listeners on this CommandService. Each time this command is executed, all the listeners of this command will be notified using the CommandListener interface.

Parameters:
commandListener - The org.eclipse.soda.dk.command.service.CommandListener listener to be added.
See Also:
removeCommandListener(CommandListener)

execute

void execute()
Execute the command, causing it to be sent to the target hardware device.

See Also:
execute(Object)

execute

void execute(java.lang.Object data)
Execute the command, and fill in any data fields with the value held within the data argument. The command will be sent to the target hardware device following the data insertion.

Parameters:
data - The data to be used when executing this command.
See Also:
execute()

removeCommandListener

void removeCommandListener(CommandListener commandListener)
Removes the specified listener from receiving listener notification. This method removes a Listener to the list of current listeners on this CommandService. The CommandListener will no longer be notified each time this command is executed.

Parameters:
commandListener - The org.eclipse.soda.dk.command.service.CommandListener listener to be removed.
See Also:
addCommandListener(CommandListener)

1.0.0

Copyright (c) 1999, 2007 IBM