|
2009-01-09 1.2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DeviceService
The DeviceService interface defines the DeviceService concept. A DeviceService is an extension of ControlService which encapsulates multiple Controls.The DeviceService provides a uniform mechanism for accessing a heterogeneous grouping of Controls. In other words a DeviceService is a container for Commands, Measurements, and Signals, which has a simple, well- defined manner in which to access them.
ControlService| Field Summary | |
|---|---|
static int |
ACTIVE
Define the ACTIVE state value. |
static int |
ALIVE
Define the ALIVE state value. |
static java.lang.String[] |
ALL_COMMANDS
Comprehensive list of all the command ids. |
static java.lang.String[] |
ALL_MEASUREMENTS
Comprehensive list of all the measurement ids. |
static java.lang.String[] |
ALL_SIGNALS
Comprehensive list of all the signal ids. |
static short |
AUTOSTART
Define the AUTOSTART style value. |
static short |
BLOCKPROCESSING
Define the BLOCKPROCESSING style value. |
static java.lang.String |
BROADCAST_COMMAND_COUNT_DATA_KEY
Define the broadcast command count data key (String) constant. |
static java.lang.String |
BROADCAST_MEASUREMENT_COUNT_DATA_KEY
Define the broadcast measurement count data key (String) constant. |
static java.lang.String |
BROADCAST_SIGNAL_COUNT_DATA_KEY
Define the broadcast signal count data key (String) constant. |
static java.lang.String |
Capabilities
Defines the Capabilities measurement. |
static java.lang.String |
CAPABILITIES_EXTERNAL_KEY
Defines the Capabilities measurement. |
static java.lang.String |
CAPABILITIES_GET_EXTERNAL_KEY
Defines the Capabilities measurement. |
static java.lang.String |
CAPABILITIES_READ_EXTERNAL_KEY
Defines the Capabilities measurement. |
static java.lang.String |
CAPABILITIES_WRITE_EXTERNAL_KEY
Defines the Capabilities measurement. |
static java.lang.String |
CHANNEL_CHANGED_EXTERNAL_KEY
Define the channel changed external key (String) constant. |
static java.lang.String |
CHANNEL_EXTERNAL_ID_DATA_KEY
Define the channel external id data key (String) constant. |
static java.lang.String |
CHANNEL_ID_DATA_KEY
Define the channel id data key (String) constant. |
static java.lang.String |
ChannelChanged
Defines the Channel Changed signal. |
static java.lang.String |
Channels
Defines the Channels measurement. |
static java.lang.String |
CHANNELS_EXTERNAL_KEY
Define the channels external key (String) constant. |
static java.lang.String |
CHANNELS_GET_EXTERNAL_KEY
Define the channels get external key (String) constant. |
static java.lang.String |
CHANNELS_READ_EXTERNAL_KEY
Define the channels read external key (String) constant. |
static java.lang.String |
CHANNELS_WRITE_EXTERNAL_KEY
Define the channels write external key (String) constant. |
static java.lang.String |
CLOSE_CHANNEL_EXTERNAL_KEY
Define the close channel external key (String) constant. |
static java.lang.String |
CloseChannel
Defines the Close Channel command. |
static java.lang.String |
Configuration
Defines the Configuration measurement. |
static java.lang.String |
CONFIGURATION_DATA_KEY
Define the configuration data key (String) constant. |
static java.lang.String |
CONFIGURATION_EXTERNAL_KEY
Defines the Configuration measurement. |
static java.lang.String |
CONFIGURATION_GET_EXTERNAL_KEY
Defines the Configuration measurement. |
static java.lang.String |
CONFIGURATION_READ_EXTERNAL_KEY
Defines the Configuration measurement. |
static java.lang.String |
CONFIGURATION_WRITE_EXTERNAL_KEY
Defines the Configuration measurement. |
static int |
CONNECTED
Define the CONNECTED state value. |
static int |
CREATED
Define the CREATED state value. |
static int |
DEAD
Define the DEAD state value. |
static java.lang.String |
ERROR_EXTERNAL_KEY
Define the error external key (String) constant. |
static short |
EVENPROCESSING
Define the EVENPROCESSING style value. |
static java.lang.String |
EXECUTE_EXTERNAL_KEY
Define the execute (String) constant. |
static java.lang.String |
GET_EXTERNAL_KEY
Define the get (String) constant. |
static short |
INITIALIZEMEASUREMENTS
Define the INITIALIZEMEASUREMENTS style value. |
static java.lang.String |
KEYS_DATA_KEY
Define the keys data key (String) constant. |
static java.lang.String |
Metrics
Defines the Status measurement. |
static java.lang.String |
METRICS_EXTERNAL_KEY
Defines the Metrics measurement. |
static java.lang.String |
METRICS_GET_EXTERNAL_KEY
Defines the Metrics measurement. |
static short |
NULL
Define the NULL style value. |
static java.lang.String |
OPEN_CHANNEL_EXTERNAL_KEY
Define the open channel external key (String) constant. |
static java.lang.String |
OpenChannel
Defines the Open Channel command. |
static java.lang.String |
READ_EXTERNAL_KEY
Define the read (String) constant. |
static java.lang.String |
RECEIVED_KEY_DATA_KEY
Define the received key data key (String) constant. |
static java.lang.String |
SERVICE_NAME
Define the OSGi service name. |
static java.lang.String |
SET_EXTERNAL_KEY
Define the set external key (String) constant. |
static java.lang.String |
SOURCE_DATA_KEY
Define the source data key (String) constant. |
static int |
STARTED
Define the STARTED state value. |
static java.lang.String |
STATE_DATA_KEY
Define the state data key (String) constant. |
static java.lang.String |
STATE_OLD_DATA_KEY
Define the state old data key (String) constant. |
static java.lang.String |
Status
Defines the Status measurement. |
static java.lang.String |
STATUS_EXTERNAL_KEY
Defines the Status measurement. |
static java.lang.String |
STATUS_GET_EXTERNAL_KEY
Defines the Status measurement. |
static java.lang.String |
STATUS_READ_EXTERNAL_KEY
Defines the Status measurement. |
static java.lang.String |
STATUS_WRITE_EXTERNAL_KEY
Defines the Status measurement. |
static java.lang.String |
TIMESTAMP_DATA_KEY
Define the timestamp data key (String) constant. |
static java.lang.String |
TRIGGER_EXTERNAL_KEY
Define the trigger (String) constant. |
static java.lang.String |
VALUE_DATA_KEY
Define the value data key (String) constant. |
static java.lang.String |
VALUE_OLD_DATA_KEY
Define the value old data key (String) constant. |
static java.lang.String |
WRITE_EXTERNAL_KEY
Define the write (String) constant. |
| Method Summary | |
|---|---|
void |
addDeviceListener(DeviceListener deviceListener)
Adds the specified listener to receive device listener notification. |
void |
closeChannel(ChannelService channel)
Close channel with the specified channel parameter. |
java.util.Enumeration |
elements()
Perform the elements method and return the Enumeration result. |
void |
exit()
Request the device to exit. |
ControlService |
get(java.lang.String key)
Perform the get method and return the ControlService result. |
ChannelService |
getChannel(java.lang.String channelId)
Get channel with the specified channel id parameter and return the ChannelService result. |
CommandService |
getCommand(java.lang.String key)
Perform the getCommand method and return the CommandService result. |
java.util.Dictionary |
getConfigurationInformation()
Gets the configuration information (Dictionary) value. |
MeasurementService |
getMeasurement(java.lang.String key)
Perform the getMeasurement method and return the MeasurementService result. |
org.eclipse.soda.dk.notification.service.NotificationService |
getNotificationService()
Gets the notification service value. |
SignalService |
getSignal(java.lang.String key)
Perform the getSignal method and return the SignalService result. |
int |
getState()
Gets the int state of the DeviceService. |
TransportService |
getTransport()
Gets the Transport transport property value. |
boolean |
isStarted()
Gets the started (boolean) value. |
ChannelService |
openChannel(java.util.Map parameters)
Open channel with the specified channel spec parameter and return the ChannelService result. |
void |
put(java.lang.String key,
ControlService control)
Perform the put action method. |
void |
remove(java.lang.String key)
Perform the remove action method. |
void |
removeDeviceListener(DeviceListener deviceListener)
Removes the specified listener from receiving device listener notification. |
void |
send(ChannelService channel,
MessageService message)
Perform the send action method. |
void |
send(ChannelService channel,
MessageService message,
ResponseListener responseListener)
Send with the specified channel and message parameters. |
void |
send(MessageService message)
Perform the send action method. |
void |
send(MessageService message,
ResponseListener responseListener)
Send the specified message. |
void |
setConfigurationInformation(java.util.Dictionary configurationInformation)
Set the configuration information. |
void |
setNotificationService(org.eclipse.soda.dk.notification.service.NotificationService notificationService)
Sets the notification service value. |
void |
setTransport(TransportService transport)
Sets the Transport transport property value. |
void |
start()
Request the device to start. |
void |
stop()
Request the device to stop. |
| Methods inherited from interface org.eclipse.soda.dk.device.service.ControlService |
|---|
getKey |
| Field Detail |
|---|
static final java.lang.String SERVICE_NAME
static final short AUTOSTART
static final short NULL
static final short INITIALIZEMEASUREMENTS
static final short EVENPROCESSING
static final short BLOCKPROCESSING
static final java.lang.String GET_EXTERNAL_KEY
static final java.lang.String READ_EXTERNAL_KEY
static final java.lang.String WRITE_EXTERNAL_KEY
static final java.lang.String SET_EXTERNAL_KEY
static final java.lang.String EXECUTE_EXTERNAL_KEY
static final java.lang.String ERROR_EXTERNAL_KEY
static final java.lang.String TRIGGER_EXTERNAL_KEY
static final java.lang.String VALUE_DATA_KEY
static final java.lang.String KEYS_DATA_KEY
static final java.lang.String VALUE_OLD_DATA_KEY
static final java.lang.String STATE_DATA_KEY
static final java.lang.String STATE_OLD_DATA_KEY
static final java.lang.String TIMESTAMP_DATA_KEY
static final java.lang.String SOURCE_DATA_KEY
static final java.lang.String CONFIGURATION_DATA_KEY
static final java.lang.String RECEIVED_KEY_DATA_KEY
static final java.lang.String[] ALL_COMMANDS
static final java.lang.String[] ALL_MEASUREMENTS
static final java.lang.String[] ALL_SIGNALS
static final java.lang.String Capabilities
static final java.lang.String CAPABILITIES_EXTERNAL_KEY
static final java.lang.String CAPABILITIES_GET_EXTERNAL_KEY
GET_EXTERNAL_KEY,
Constant Field Valuesstatic final java.lang.String CAPABILITIES_READ_EXTERNAL_KEY
GET_EXTERNAL_KEY,
READ_EXTERNAL_KEY,
Constant Field Valuesstatic final java.lang.String CAPABILITIES_WRITE_EXTERNAL_KEY
GET_EXTERNAL_KEY,
READ_EXTERNAL_KEY,
WRITE_EXTERNAL_KEY,
Constant Field Valuesstatic final java.lang.String Configuration
static final java.lang.String CONFIGURATION_EXTERNAL_KEY
static final java.lang.String CONFIGURATION_GET_EXTERNAL_KEY
GET_EXTERNAL_KEY,
Constant Field Valuesstatic final java.lang.String CONFIGURATION_READ_EXTERNAL_KEY
GET_EXTERNAL_KEY,
READ_EXTERNAL_KEY,
Constant Field Valuesstatic final java.lang.String CONFIGURATION_WRITE_EXTERNAL_KEY
GET_EXTERNAL_KEY,
READ_EXTERNAL_KEY,
WRITE_EXTERNAL_KEY,
Constant Field Valuesstatic final java.lang.String Status
static final java.lang.String STATUS_EXTERNAL_KEY
static final java.lang.String STATUS_GET_EXTERNAL_KEY
GET_EXTERNAL_KEY,
Constant Field Valuesstatic final java.lang.String STATUS_READ_EXTERNAL_KEY
GET_EXTERNAL_KEY,
READ_EXTERNAL_KEY,
Constant Field Valuesstatic final java.lang.String STATUS_WRITE_EXTERNAL_KEY
GET_EXTERNAL_KEY,
READ_EXTERNAL_KEY,
WRITE_EXTERNAL_KEY,
Constant Field Valuesstatic final int ACTIVE
static final int ALIVE
static final int CONNECTED
static final int CREATED
static final int DEAD
static final int STARTED
static final java.lang.String Metrics
static final java.lang.String METRICS_EXTERNAL_KEY
static final java.lang.String METRICS_GET_EXTERNAL_KEY
GET_EXTERNAL_KEY,
Constant Field Valuesstatic final java.lang.String BROADCAST_COMMAND_COUNT_DATA_KEY
static final java.lang.String BROADCAST_MEASUREMENT_COUNT_DATA_KEY
static final java.lang.String BROADCAST_SIGNAL_COUNT_DATA_KEY
static final java.lang.String CHANNEL_ID_DATA_KEY
static final java.lang.String CHANNEL_EXTERNAL_ID_DATA_KEY
static final java.lang.String Channels
static final java.lang.String CHANNELS_EXTERNAL_KEY
static final java.lang.String CHANNELS_GET_EXTERNAL_KEY
static final java.lang.String CHANNELS_READ_EXTERNAL_KEY
static final java.lang.String CHANNELS_WRITE_EXTERNAL_KEY
static final java.lang.String ChannelChanged
static final java.lang.String CHANNEL_CHANGED_EXTERNAL_KEY
static final java.lang.String OpenChannel
static final java.lang.String OPEN_CHANNEL_EXTERNAL_KEY
static final java.lang.String CloseChannel
static final java.lang.String CLOSE_CHANNEL_EXTERNAL_KEY
| Method Detail |
|---|
void addDeviceListener(DeviceListener deviceListener)
deviceListener - The device listener (DeviceListener) parameter.removeDeviceListener(DeviceListener)void closeChannel(ChannelService channel)
channel - The channel (ChannelService) parameter.getChannel(String),
openChannel(Map)java.util.Enumeration elements()
Enumeration result. This method returns an enumeration of the Controls contained within the DeviceService.
Enumeration) value.void exit()
NOTE: When running under OSGi bundles, only Device Bundle Activator should be calling this method.
ControlService get(java.lang.String key)
ControlService result. This method returns the ControlService contained within the DeviceService, whose key matches the key argument.
key - The key (String) parameter.
ChannelService getChannel(java.lang.String channelId)
channelId - The channel ID (String) parameter.
ChannelService) value.closeChannel(ChannelService),
openChannel(Map)CommandService getCommand(java.lang.String key)
CommandService result. This method returns the CommandService contained within the DeviceService, whose key matches the key argument. Some implementations of this method will throw a
ClassCastException if the ControlService found is not a CommandService.
key - The key (String) parameter.
CommandService) value.java.util.Dictionary getConfigurationInformation()
setConfigurationInformation(Dictionary)MeasurementService getMeasurement(java.lang.String key)
MeasurementService result. This method returns the MeasurementService contained within the DeviceService, whose key matches the key argument. Some implementations of this method will
throw a ClassCastException if the ControlService found is not a MeasurementService.
key - The key (String) parameter.
org.eclipse.soda.dk.notification.service.NotificationService getNotificationService()
NotificationService) value.setNotificationService(NotificationService)SignalService getSignal(java.lang.String key)
SignalService result. This method returns the SignalService contained within the DeviceService, whose key matches the key argument. Some implementations of this method will throw a
ClassCastException if the ControlService found is not a SignalService.
key - The key (String) parameter.
int getState()
TransportService getTransport()
Transport transport property value. This method returns a reference to the TransportService used by this DeviceService
setTransport(TransportService)boolean isStarted()
boolean) value.
ChannelService openChannel(java.util.Map parameters)
throws java.io.IOException
parameters - The parameters (Map) parameter.
ChannelService) value.
java.io.IOException - IOException.closeChannel(ChannelService),
getChannel(String)
void put(java.lang.String key,
ControlService control)
NOTE: Normally, application code should not be using this method.
key - The key (String) parameter.control - The control (ControlService) parameter.void remove(java.lang.String key)
NOTE: Normally, application code should not be using this method.
key - The key (String) parameter.void removeDeviceListener(DeviceListener deviceListener)
deviceListener - The device listener (DeviceListener) parameter.addDeviceListener(DeviceListener)
void send(ChannelService channel,
MessageService message)
NOTE: Normally, application code should not be using this method.
channel - The channel (ChannelService) parameter.message - The message (MessageService) parameter.send(ChannelService,MessageService,ResponseListener),
send(MessageService,ResponseListener),
send(MessageService)
void send(ChannelService channel,
MessageService message,
ResponseListener responseListener)
channel - The channel (ChannelService) parameter.message - The message (MessageService) parameter.responseListener - The response listener (ResponseListener) parameter.send(ChannelService,MessageService),
send(MessageService,ResponseListener),
send(MessageService)
void send(MessageService message,
ResponseListener responseListener)
org.eclipse.soda.dk.message.service.MessageService
message - The message (MessageService) parameter.responseListener - The response listener (ResponseListener) parameter.send(ChannelService,MessageService),
send(ChannelService,MessageService,ResponseListener),
send(MessageService)void send(MessageService message)
NOTE: Normally, application code should not be using this method.
message - The message (MessageService) parameter.send(ChannelService,MessageService),
send(ChannelService,MessageService,ResponseListener),
send(MessageService,ResponseListener)void setConfigurationInformation(java.util.Dictionary configurationInformation)
configurationInformation - The configuration information (Dictionary) parameter.getConfigurationInformation()void setNotificationService(org.eclipse.soda.dk.notification.service.NotificationService notificationService)
notificationService - The notification service (NotificationService) parameter.getNotificationService()void setTransport(TransportService transport)
Transport transport property value. This method sets the TransportService which will be used by this DeviceService
NOTE: When running under OSGi bundles, only Device Bundle Activator should be calling this method.
transport - The transport (TransportService) parameter.getTransport()void start()
NOTE: When running under OSGi bundles, only Device Bundle Activator should be calling this method.
void stop()
NOTE: When running under OSGi bundles, only Device Bundle Activator should be calling this method.
|
2009-01-09 1.2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||