2009-01-09 1.2.0

org.eclipse.soda.dk.device
Class Device

java.lang.Object
  extended by org.eclipse.soda.dk.core.EscObject
      extended by org.eclipse.soda.dk.device.Control
          extended by org.eclipse.soda.dk.device.Container
              extended by org.eclipse.soda.dk.device.Device
All Implemented Interfaces:
java.lang.Runnable, ControlService, DeviceService, ErrorListener
Direct Known Subclasses:
Adapter, BaseDevice, DeviceRegistry, Profile, TestDevice, TransportDevice

public class Device
extends Container
implements DeviceService, java.lang.Runnable

The Device class implements the DeviceService interface.

Since:
1.0
Version:
1.2.0
See Also:
Container, Control, ControlService, ErrorListener, Hashtable, MessageHandler, TransportListener

Field Summary
protected  Signal channelChanged
          Define the channel changed (Signal) field.
protected  Measurement channels
          Define the channels (Measurement) field.
protected  Command closeChannel
          Define the close channel (Command) field.
protected  Command openChannel
          Define the open channel (Command) field.
static java.lang.String POLL_COMMAND_NAME
          Define the poll command name (String) constant.
static java.lang.String START_COMMAND_NAME
          Define the start command name (String) constant.
protected static int STARTED_MASK
          Define the started (int) constant.
static java.lang.String STOP_COMMAND_NAME
          Define the stop command name (String) constant.
 
Fields inherited from class org.eclipse.soda.dk.device.Container
broadcastCommandCount, broadcastMeasurementCount, broadcastSignalCount, capabilities, CHANNEL_CHANGED_EXCEPTION_RESOURCE, configuration, DEVICE_ACTIVE_STATE_RESOURCE, DEVICE_ALIVE_STATE_RESOURCE, DEVICE_CHANGED_EXCEPTION_RESOURCE, DEVICE_CONNECTED_STATE_RESOURCE, DEVICE_CREATED_STATE_RESOURCE, DEVICE_DEAD_STATE_RESOURCE, DEVICE_STARTED_STATE_RESOURCE, DEVICE_STATE_RESOURCE_TABLE, EXCEPTION_NO_TRANSPORT_RESOURCE, INITIALIZE_CONFIGURATION_EXCEPTION_RESOURCE, INITIALIZE_CONFIGURATION_MISCOMPARE_RESOURCE, INITIALIZE_CONFIGURATION_RESOURCE, INITIALIZE_CONFIGURATION_SAME_RESOURCE, INITIALIZE_READ_EXCEPTION_RESOURCE, INITIALIZE_WRITE_EXCEPTION_RESOURCE, logLevel, MESSAGE_RECEIVED_EXCEPTION_RESOURCE, metrics, NOTIFICATION_PRIORITY_DEFAULT, notificationPriority, PROCESSING_UNABLE_TO_KEEP_UP_EXCEPTION_RESOURCE, RUN_EXCEPTION_RESOURCE, SEND_EXCEPTION_RESOURCE, stateChanged, status, TOPIC_DELIMITER
 
Fields inherited from class org.eclipse.soda.dk.device.Control
EXCEPTION_READ_FAILED_RESOURCE, SET_VALUE_EXCEPTION_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, 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
 
Fields inherited from interface org.eclipse.soda.dk.device.service.DeviceService
ACTIVE, ALIVE, ALL_COMMANDS, ALL_MEASUREMENTS, ALL_SIGNALS, AUTOSTART, BLOCKPROCESSING, BROADCAST_COMMAND_COUNT_DATA_KEY, BROADCAST_MEASUREMENT_COUNT_DATA_KEY, BROADCAST_SIGNAL_COUNT_DATA_KEY, Capabilities, CAPABILITIES_EXTERNAL_KEY, CAPABILITIES_GET_EXTERNAL_KEY, CAPABILITIES_READ_EXTERNAL_KEY, CAPABILITIES_WRITE_EXTERNAL_KEY, CHANNEL_CHANGED_EXTERNAL_KEY, CHANNEL_EXTERNAL_ID_DATA_KEY, CHANNEL_ID_DATA_KEY, ChannelChanged, Channels, CHANNELS_EXTERNAL_KEY, CHANNELS_GET_EXTERNAL_KEY, CHANNELS_READ_EXTERNAL_KEY, CHANNELS_WRITE_EXTERNAL_KEY, CLOSE_CHANNEL_EXTERNAL_KEY, CloseChannel, Configuration, CONFIGURATION_DATA_KEY, CONFIGURATION_EXTERNAL_KEY, CONFIGURATION_GET_EXTERNAL_KEY, CONFIGURATION_READ_EXTERNAL_KEY, CONFIGURATION_WRITE_EXTERNAL_KEY, CONNECTED, CREATED, DEAD, ERROR_EXTERNAL_KEY, EVENPROCESSING, EXECUTE_EXTERNAL_KEY, GET_EXTERNAL_KEY, INITIALIZEMEASUREMENTS, KEYS_DATA_KEY, Metrics, METRICS_EXTERNAL_KEY, METRICS_GET_EXTERNAL_KEY, NULL, OPEN_CHANNEL_EXTERNAL_KEY, OpenChannel, READ_EXTERNAL_KEY, RECEIVED_KEY_DATA_KEY, SERVICE_NAME, SET_EXTERNAL_KEY, SOURCE_DATA_KEY, STARTED, STATE_DATA_KEY, STATE_OLD_DATA_KEY, Status, STATUS_EXTERNAL_KEY, STATUS_GET_EXTERNAL_KEY, STATUS_READ_EXTERNAL_KEY, STATUS_WRITE_EXTERNAL_KEY, TIMESTAMP_DATA_KEY, TRIGGER_EXTERNAL_KEY, VALUE_DATA_KEY, VALUE_OLD_DATA_KEY, WRITE_EXTERNAL_KEY
 
Constructor Summary
  Device()
          Constructs a Device object.
protected Device(java.lang.String capabilities, java.lang.String status, java.lang.String configuration, java.lang.String metrics)
          Constructs an instance of this class from the specified capabilities, status, configuration and metrics parameters.
protected Device(java.lang.String capabilities, java.lang.String status, java.lang.String configuration, java.lang.String metrics, java.lang.String channels, java.lang.String channelChanged, java.lang.String openChannel, java.lang.String closeChannel)
          Constructs an instance of this class from the specified capabilities, status, configuration, metrics, channels, channel changed, open channel and close channel parameters.
 
Method Summary
 void addDeviceListener(DeviceListener deviceListener)
          Add device listener with the specified device listener parameter.
protected  void channelChanged(java.lang.Object timestamp, ChannelService channel, int newState, int oldState)
          Channel changed with the specified timestamp, channel, new state and old state parameters.
 void channelChanged(TransportService source, java.lang.Object timestamp, ChannelService channel, int newState, int oldState)
          Channel changed with the specified source, timestamp, channel, new state and old state parameters.
 void closeChannel(ChannelService channel)
          Close channel with the specified channel parameter.
 void controlAdded(EscObject container, java.lang.Object currentTimestamp, ControlService control)
          Control added with the specified container, current timestamp and control parameters.
 void controlRemoved(EscObject container, java.lang.Object timestamp, ControlService control)
          Control removed with the specified container, timestamp and control parameters.
protected  void finalize()
          Perform the finalize action method.
 void fireChannelChanged(java.lang.Object timestamp, ChannelService channel, int newState, int oldState)
          Fire channel changed with the specified timestamp, channel, new state and old state parameters.
 void fireContainerChanged(java.lang.Object timestamp, int newState, int oldState)
          Fire container changed with the specified timestamp, new state and old state parameters.
 void fireErrorOccurred(java.lang.Object timestamp, java.lang.Object data)
          Perform the fireErrorOccurred action method.
 MeasurementService getCapabilities()
          Defines the Capabilities measurement.
 ChannelService getChannel(java.lang.String channelId)
          Get channel with the specified channel id parameter and return the ChannelService result.
 Signal getChannelChanged()
          Gets the channel changed (Signal) value.
 Measurement getChannels()
          Gets the channels (Measurement) value.
 Command getCloseChannel()
          Gets the close channel (Command) value.
 MeasurementService getConfiguration()
          Defines the Configuration measurement.
 java.lang.String getDefaultKey()
          Method getDefaultKey.
 DeviceListener getDeviceListener()
          Gets the device listener value.
 int getMessageCapacity()
          Gets the message capacity (int) value.
 java.lang.Object getMessageKey(MessageService message)
          Get message key with the specified message parameter and return the Object result.
 MultiplexDeviceListener getMultiplexDeviceListener()
          Gets the multiplex device listener value.
 int getNotificationPriorityDefault()
          Gets the notification priority default (int) value.
 Command getOpenChannel()
          Gets the open channel (Command) value.
 int getPriority()
          Gets the int priority property value.
 long getReadTimeout()
          Gets the read timeout (long) value.
 MeasurementService getStatus()
          Defines the Status measurement.
 java.lang.Thread getThread()
          Gets the thread value.
 java.lang.Object handleMethodChannels(int code, Measurement measurement, ChannelService channel, java.lang.Object data)
          Handle method channels with the specified code, measurement, channel and data parameters and return the Object result.
 java.lang.Object handleMethodCloseChannel(int code, Command command, ChannelService channel, java.lang.Object data)
          Handle method close channel with the specified code, command, channel and data parameters and return the Object result.
 java.lang.Object handleMethodMetrics(int code, Measurement measurement, ChannelService channel, java.lang.Object data)
          Handle method metrics with the specified code, measurement, channel and data parameters and return the Object result.
 java.lang.Object handleMethodOpenChannel(int code, Command command, ChannelService channel, java.lang.Object data)
          Handle method open channel with the specified code, command, channel and data parameters and return the Object result.
 boolean hasListeners()
          Gets the listeners (boolean) value.
protected  void initialize(java.lang.String capabilities, java.lang.String status, java.lang.String configuration, java.lang.String metrics)
          Initialize with the specified capabilities, status, configuration and metrics parameters.
protected  void initialize(java.lang.String capabilities, java.lang.String status, java.lang.String configuration, java.lang.String metrics, java.lang.String channels, java.lang.String channelChanged, java.lang.String openChannel, java.lang.String closeChannel)
          Initialize with the specified capabilities, status, configuration, metrics, channels, channel changed, open channel and close channel parameters.
 boolean isAutoStart()
          Gets the boolean autoStart property value.
 boolean isBlockProcessing()
          Gets the block processing (boolean) value.
 boolean isEvenProcessing()
          Gets the even processing (boolean) value.
 boolean isRunning()
          Gets the running (boolean) value.
 boolean isStarted()
          Gets the started (boolean) value.
 boolean isThreadNeeded()
          Gets the thread needed (boolean) value.
protected  void load(ControlService control)
          Perform the load action method.
 ChannelService openChannel(java.util.Map parameters)
          Open channel with the specified parameters parameter and return the ChannelService result.
 void put(java.lang.String key, ControlService control)
          Put with the specified key and control parameters.
 void remove(java.lang.String key)
          Remove with the specified key parameter.
 void removeDeviceListener(DeviceListener deviceListener)
          Remove device listener with the specified device listener parameter.
 void restart()
          Restart.
 void run()
          Run.
 void setDeviceListener(DeviceListener deviceListener)
          Sets the device listener value.
 void setReadTimeout(long readTimeout)
          Sets the read timeout value.
 void setRunning(boolean running)
          Sets the running value.
 void setStarted(boolean started)
          Sets the started value.
 void setThread(java.lang.Thread thread)
          Sets the thread value.
 void start()
          Perform the start action method.
 void startup(boolean output)
          Startup with the specified output parameter.
 void stop()
          Perform the stop action method.
 
Methods inherited from class org.eclipse.soda.dk.device.Container
activate, activate, addData, addQualifiedKeys, attemptRecoveryFromError, broadcast, broadcastStatus, broadcastStatus, changeIds, collectMetrics, createFilter, deactivate, deactivate, elements, errorOccurred, exit, get, getBroadcastCommandCount, getBroadcastMeasurementCount, getBroadcastSignalCount, getBundleContext, getCommand, getConfigurationInformation, getConfigurationInformation, getConfigurationService, getControlCapacity, getControls, getDefaultStyle, getErrorSeverity, getInformation, getLogDetails4, getLogDetails5, getLogDetails6, getLogLevel, getMeasurement, getMetrics, getNotificationController, getNotificationPriority, getNotificationService, getNumberValue, getPrefix, getSignal, getState, getStatusDictionary, getString, getStyle, getTransport, handleMethodMetrics, initializeMeasurements, initializeMeasurements, isInitializeMeasurements, keys, notificationReceived, prependPrefix, prependPrefix, put, putConfigurationInformation, register, register, removeListeners, removeQualifiedKeys, send, send, send, send, setBroadcastCommandCount, setBroadcastMeasurementCount, setBroadcastSignalCount, setBundleContext, setConfigurationInformation, setInformation, setListenersNull, setLogLevel, setMetrics, setNotificationController, setNotificationPriority, setNotificationService, setState, setStateLocal, setStyle, setTransport, setup, setupCustom, setupNotification, setupNotificationCustom, startupCommands, startupCommands, toString, toStringInfo, transportStartedWait, unregister, unsubscribe, updateBroadcastCommandCount, updateBroadcastMeasurementCount, updateBroadcastSignalCount, validConfigurationId
 
Methods inherited from class org.eclipse.soda.dk.device.Control
equalsValue, findMethod, getCodeKey, getKey, getQualifiedKey, getResource, setKey, setQualifiedKey
 
Methods inherited from class org.eclipse.soda.dk.core.EscObject
createBoolean, createDefaultLogService, createException, createException, createInteger, createIntegerTable, createLong, createLongTable, createNumber, format, getBoolean, getByte, getChar, getCurrentTimestamp, getDefaultLogService, getDefaultResource, getDouble, getFloat, getId, getIdName, getInt, getLoadLibraryName, getLogDetails, getLogDetails, getLogDetails0, getLogDetails1, getLogDetails2, getLogDetails3, getLogDetails7, getLogService, getLong, getObject, getOutputName, getReadOnlyEmptyCollection, getReadOnlyEmptyList, getReadOnlyEmptyMap, getShort, getSimpleClassName, getStaticBoolean, getStaticByte, getStaticChar, getStaticDouble, getStaticFloat, getStaticInt, getStaticLong, getStaticObject, getStaticShort, getStaticString, 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, reportError, reportSystemInfo, setBackward, setDebug, setDefaultLogService, setLogService, setTraceLevel, setUnmodifiable, shouldLog, sleep, startupEscStatic, toStringConfigurationKeys
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.soda.dk.device.service.DeviceService
elements, exit, get, getCommand, getConfigurationInformation, getMeasurement, getNotificationService, getSignal, getState, getTransport, send, send, send, send, setConfigurationInformation, setNotificationService, setTransport
 
Methods inherited from interface org.eclipse.soda.dk.device.service.ControlService
getKey
 

Field Detail

START_COMMAND_NAME

public static final java.lang.String START_COMMAND_NAME
Define the start command name (String) constant.

See Also:
Constant Field Values

STOP_COMMAND_NAME

public static final java.lang.String STOP_COMMAND_NAME
Define the stop command name (String) constant.

See Also:
Constant Field Values

POLL_COMMAND_NAME

public static final java.lang.String POLL_COMMAND_NAME
Define the poll command name (String) constant.

See Also:
Constant Field Values

STARTED_MASK

protected static final int STARTED_MASK
Define the started (int) constant.

See Also:
Constant Field Values

channels

protected Measurement channels
Define the channels (Measurement) field.

Since:
1.2

channelChanged

protected Signal channelChanged
Define the channel changed (Signal) field.

Since:
1.2

openChannel

protected Command openChannel
Define the open channel (Command) field.

Since:
1.2

closeChannel

protected Command closeChannel
Define the close channel (Command) field.

Since:
1.2
Constructor Detail

Device

public Device()
Constructs a Device object.

See Also:
Device(String,String,String,String), Device(String,String,String,String,String,String,String,String)

Device

protected Device(java.lang.String capabilities,
                 java.lang.String status,
                 java.lang.String configuration,
                 java.lang.String metrics)
Constructs an instance of this class from the specified capabilities, status, configuration and metrics parameters.

Parameters:
capabilities - The capabilities (String) parameter.
status - The status (String) parameter.
configuration - The configuration (String) parameter.
metrics - The metrics (String) parameter.
See Also:
Device(), Device(String,String,String,String,String,String,String,String)

Device

protected Device(java.lang.String capabilities,
                 java.lang.String status,
                 java.lang.String configuration,
                 java.lang.String metrics,
                 java.lang.String channels,
                 java.lang.String channelChanged,
                 java.lang.String openChannel,
                 java.lang.String closeChannel)
Constructs an instance of this class from the specified capabilities, status, configuration, metrics, channels, channel changed, open channel and close channel parameters.

Parameters:
capabilities - The capabilities (String) parameter.
status - The status (String) parameter.
configuration - The configuration (String) parameter.
metrics - The metrics (String) parameter.
channels - The channels (String) parameter.
channelChanged - The channel changed (String) parameter.
openChannel - The open channel (String) parameter.
closeChannel - The close channel (String) parameter.
Since:
1.2
See Also:
Device(), Device(String,String,String,String)
Method Detail

addDeviceListener

public void addDeviceListener(DeviceListener deviceListener)
Add device listener with the specified device listener parameter.

Specified by:
addDeviceListener in interface DeviceService
Parameters:
deviceListener - The device listener (DeviceListener) parameter.
See Also:
getDeviceListener(), getMultiplexDeviceListener(), removeDeviceListener(DeviceListener), setDeviceListener(DeviceListener)

channelChanged

protected void channelChanged(java.lang.Object timestamp,
                              ChannelService channel,
                              int newState,
                              int oldState)
Channel changed with the specified timestamp, channel, new state and old state parameters.

Parameters:
timestamp - The time stamp (Object) parameter.
channel - The channel (ChannelService) parameter.
newState - The new state (int) parameter.
oldState - The old state (int) parameter.
Since:
1.2
See Also:
channelChanged(TransportService,Object,ChannelService,int,int), fireChannelChanged(Object,ChannelService,int,int), fireContainerChanged(Object,int,int), getChannelChanged()

channelChanged

public void channelChanged(TransportService source,
                           java.lang.Object timestamp,
                           ChannelService channel,
                           int newState,
                           int oldState)
Channel changed with the specified source, timestamp, channel, new state and old state parameters.

Parameters:
source - The source (TransportService) parameter.
timestamp - The time stamp (Object) parameter.
channel - The channel (ChannelService) parameter.
newState - The new state (int) parameter.
oldState - The old state (int) parameter.
Since:
1.2
See Also:
channelChanged(Object,ChannelService,int,int), fireChannelChanged(Object,ChannelService,int,int), fireContainerChanged(Object,int,int), getChannelChanged()

closeChannel

public void closeChannel(ChannelService channel)
Close channel with the specified channel parameter.

Specified by:
closeChannel in interface DeviceService
Parameters:
channel - The channel (ChannelService) parameter.
Since:
1.2
See Also:
getChannel(String), getCloseChannel(), getOpenChannel(), handleMethodCloseChannel(int,Command,ChannelService,Object), handleMethodOpenChannel(int,Command,ChannelService,Object), openChannel(Map)

controlAdded

public void controlAdded(EscObject container,
                         java.lang.Object currentTimestamp,
                         ControlService control)
Control added with the specified container, current timestamp and control parameters.

Parameters:
container - The container (EscObject) parameter.
currentTimestamp - The current time stamp (Object) parameter.
control - The control (ControlService) parameter.

controlRemoved

public void controlRemoved(EscObject container,
                           java.lang.Object timestamp,
                           ControlService control)
Control removed with the specified container, timestamp and control parameters.

Parameters:
container - The container (EscObject) parameter.
timestamp - The time stamp (Object) parameter.
control - The control (ControlService) parameter.

finalize

protected void finalize()
                 throws java.lang.Throwable
Perform the finalize action method.

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable - Throwable.

fireChannelChanged

public void fireChannelChanged(java.lang.Object timestamp,
                               ChannelService channel,
                               int newState,
                               int oldState)
Fire channel changed with the specified timestamp, channel, new state and old state parameters.

Parameters:
timestamp - The time stamp (Object) parameter.
channel - The channel (ChannelService) parameter.
newState - The new state (int) parameter.
oldState - The old state (int) parameter.
Since:
1.2
See Also:
getChannelChanged()

fireContainerChanged

public void fireContainerChanged(java.lang.Object timestamp,
                                 int newState,
                                 int oldState)
Fire container changed with the specified timestamp, new state and old state parameters.

Overrides:
fireContainerChanged in class Container
Parameters:
timestamp - The time stamp (Object) parameter.
newState - The new state (int) parameter.
oldState - The old state (int) parameter.

fireErrorOccurred

public void fireErrorOccurred(java.lang.Object timestamp,
                              java.lang.Object data)
Perform the fireErrorOccurred action method.

Overrides:
fireErrorOccurred in class Container
Parameters:
timestamp - The time stamp (Object) parameter.
data - The data (Object) parameter.

getCapabilities

public MeasurementService getCapabilities()
Defines the Capabilities measurement.

Overrides:
getCapabilities in class Container
Returns:
Results of the get capabilities (MeasurementService)

getChannel

public ChannelService getChannel(java.lang.String channelId)
Get channel with the specified channel id parameter and return the ChannelService result.

Specified by:
getChannel in interface DeviceService
Parameters:
channelId - The channel ID (String) parameter.
Returns:
Results of the get channel (ChannelService) value.
Since:
1.2
See Also:
closeChannel(ChannelService), getCloseChannel(), getOpenChannel(), handleMethodCloseChannel(int,Command,ChannelService,Object), handleMethodOpenChannel(int,Command,ChannelService,Object), openChannel(Map)

getChannelChanged

public Signal getChannelChanged()
Gets the channel changed (Signal) value.

Returns:
The channel changed (Signal) value.
Since:
1.2
See Also:
fireChannelChanged(Object,ChannelService,int,int)

getChannels

public Measurement getChannels()
Gets the channels (Measurement) value.

Returns:
The channels (Measurement) value.
Since:
1.2
See Also:
handleMethodChannels(int,Measurement,ChannelService,Object)

getCloseChannel

public Command getCloseChannel()
Gets the close channel (Command) value.

Returns:
The close channel (Command) value.
Since:
1.2
See Also:
handleMethodCloseChannel(int,Command,ChannelService,Object)

getConfiguration

public MeasurementService getConfiguration()
Defines the Configuration measurement.

Overrides:
getConfiguration in class Container
Returns:
Results of the get configuration (MeasurementService)

getDefaultKey

public java.lang.String getDefaultKey()
Description copied from class: Container
Method getDefaultKey.

Specified by:
getDefaultKey in class Container
Returns:
Results of the get default key (String) value.
See Also:
Container.getDefaultKey()

getDeviceListener

public DeviceListener getDeviceListener()
Gets the device listener value.

Returns:
The device listener (DeviceListener) value.
See Also:
addDeviceListener(DeviceListener), getMultiplexDeviceListener(), removeDeviceListener(DeviceListener), setDeviceListener(DeviceListener)

getMessageCapacity

public int getMessageCapacity()
Gets the message capacity (int) value.

Returns:
int The message capacity.

getMessageKey

public java.lang.Object getMessageKey(MessageService message)
Get message key with the specified message parameter and return the Object result.

Parameters:
message - The message (MessageService) parameter.
Returns:
Results of the get message key (Object) value.

getMultiplexDeviceListener

public MultiplexDeviceListener getMultiplexDeviceListener()
Gets the multiplex device listener value.

Returns:
The multiplex device listener (MultiplexDeviceListener) value.
Since:
1.2

getNotificationPriorityDefault

public int getNotificationPriorityDefault()
Gets the notification priority default (int) value.

Overrides:
getNotificationPriorityDefault in class Container
Returns:
The notification priority default (int) value.
Since:
1.2

getOpenChannel

public Command getOpenChannel()
Gets the open channel (Command) value.

Returns:
The open channel (Command) value.
Since:
1.2
See Also:
handleMethodOpenChannel(int,Command,ChannelService,Object)

getPriority

public int getPriority()
Gets the int priority property value.

Return the priority of the thread.

Returns:
int The thread priority

getReadTimeout

public long getReadTimeout()
Gets the read timeout (long) value.

Overrides:
getReadTimeout in class Container
Returns:
The read timeout (long) value.
See Also:
setReadTimeout(long)

getStatus

public MeasurementService getStatus()
Defines the Status measurement.

Overrides:
getStatus in class Container
Returns:
Results of the get status (MeasurementService)
See Also:
Container.broadcastStatus(), Container.broadcastStatus(Object,int,int)

getThread

public java.lang.Thread getThread()
Gets the thread value.

Returns:
The thread (Thread) value.
See Also:
setThread(Thread)

handleMethodChannels

public java.lang.Object handleMethodChannels(int code,
                                             Measurement measurement,
                                             ChannelService channel,
                                             java.lang.Object data)
Handle method channels with the specified code, measurement, channel and data parameters and return the Object result.

Parameters:
code - The code (int) parameter.
measurement - The measurement (Measurement) parameter.
channel - The channel (ChannelService) parameter.
data - The data (Object) parameter.
Returns:
Results of the handle method metrics (Object) value.
Since:
1.2

handleMethodCloseChannel

public java.lang.Object handleMethodCloseChannel(int code,
                                                 Command command,
                                                 ChannelService channel,
                                                 java.lang.Object data)
                                          throws java.io.IOException
Handle method close channel with the specified code, command, channel and data parameters and return the Object result.

Parameters:
code - The code (int) parameter.
command - The command (Command) parameter.
channel - The channel (ChannelService) parameter.
data - The data (Object) parameter.
Returns:
Results of the handle method close channel (Object) value.
Throws:
java.io.IOException - IOException.
Since:
1.2

handleMethodMetrics

public java.lang.Object handleMethodMetrics(int code,
                                            Measurement measurement,
                                            ChannelService channel,
                                            java.lang.Object data)
Handle method metrics with the specified code, measurement, channel and data parameters and return the Object result.

Parameters:
code - The code (int) parameter.
measurement - The measurement (Measurement) parameter.
channel - The channel (ChannelService) parameter.
data - The data (Object) parameter.
Returns:
Results of the handle method metrics (Object) value.
Since:
1.2

handleMethodOpenChannel

public java.lang.Object handleMethodOpenChannel(int code,
                                                Command command,
                                                ChannelService channel,
                                                java.lang.Object data)
                                         throws java.io.IOException
Handle method open channel with the specified code, command, channel and data parameters and return the Object result.

Parameters:
code - The code (int) parameter.
command - The command (Command) parameter.
channel - The channel (ChannelService) parameter.
data - The data (Object) parameter.
Returns:
Results of the handle method open channel (Object) value.
Throws:
java.io.IOException - IOException.
Since:
1.2

hasListeners

public boolean hasListeners()
Gets the listeners (boolean) value.

Returns:
The listeners (boolean) value.

initialize

protected void initialize(java.lang.String capabilities,
                          java.lang.String status,
                          java.lang.String configuration,
                          java.lang.String metrics)
Initialize with the specified capabilities, status, configuration and metrics parameters.

Parameters:
capabilities - The capabilities (String) parameter.
status - The status (String) parameter.
configuration - The configuration (String) parameter.
metrics - The metrics (String) parameter.
See Also:
initialize(String,String,String,String,String,String,String,String)

initialize

protected void initialize(java.lang.String capabilities,
                          java.lang.String status,
                          java.lang.String configuration,
                          java.lang.String metrics,
                          java.lang.String channels,
                          java.lang.String channelChanged,
                          java.lang.String openChannel,
                          java.lang.String closeChannel)
Initialize with the specified capabilities, status, configuration, metrics, channels, channel changed, open channel and close channel parameters.

Parameters:
capabilities - The capabilities (String) parameter.
status - The status (String) parameter.
configuration - The configuration (String) parameter.
metrics - The metrics (String) parameter.
channels - The channels (String) parameter.
channelChanged - The channel changed (String) parameter.
openChannel - The open channel (String) parameter.
closeChannel - The close channel (String) parameter.
Since:
1.2
See Also:
initialize(String,String,String,String)

isAutoStart

public boolean isAutoStart()
Gets the boolean autoStart property value.

Returns:
Results of the is auto start (boolean) value.

isBlockProcessing

public boolean isBlockProcessing()
Gets the block processing (boolean) value.

Returns:
The block processing (boolean) value.

isEvenProcessing

public boolean isEvenProcessing()
Gets the even processing (boolean) value.

Returns:
The even processing (boolean) value.

isRunning

public boolean isRunning()
Gets the running (boolean) value.

Overrides:
isRunning in class Container
Returns:
The running (boolean) value.
See Also:
setRunning(boolean)

isStarted

public boolean isStarted()
Gets the started (boolean) value.

Specified by:
isStarted in interface DeviceService
Returns:
The started (boolean) value.
See Also:
setStarted(boolean)

isThreadNeeded

public boolean isThreadNeeded()
Gets the thread needed (boolean) value.

Returns:
The thread needed (boolean) value.

load

protected void load(ControlService control)
Perform the load action method. org.eclipse.soda.dk.device.service.ControlService The

Overrides:
load in class Container
Parameters:
control - The control (ControlService) parameter.

openChannel

public ChannelService openChannel(java.util.Map parameters)
                           throws java.io.IOException
Open channel with the specified parameters parameter and return the ChannelService result.

Specified by:
openChannel in interface DeviceService
Parameters:
parameters - The parameters (Map) parameter.
Returns:
Results of the open channel (ChannelService) value.
Throws:
java.io.IOException - IOException.
Since:
1.2
See Also:
closeChannel(ChannelService), getChannel(String), getCloseChannel(), getOpenChannel(), handleMethodCloseChannel(int,Command,ChannelService,Object), handleMethodOpenChannel(int,Command,ChannelService,Object)

put

public void put(java.lang.String key,
                ControlService control)
Put with the specified key and control parameters. The key (String)

Specified by:
put in interface DeviceService
Overrides:
put in class Container
Parameters:
key - The key (String) parameter.
control - The control (ControlService) parameter.
See Also:
Container.put(ControlService)

remove

public void remove(java.lang.String key)
Remove with the specified key parameter.

Specified by:
remove in interface DeviceService
Overrides:
remove in class Container
Parameters:
key - The key (String) parameter.

removeDeviceListener

public void removeDeviceListener(DeviceListener deviceListener)
Remove device listener with the specified device listener parameter.

Specified by:
removeDeviceListener in interface DeviceService
Parameters:
deviceListener - The device listener (DeviceListener) parameter.
See Also:
addDeviceListener(DeviceListener), getDeviceListener(), getMultiplexDeviceListener(), setDeviceListener(DeviceListener)

restart

public void restart()
Restart.


run

public void run()
Run.

Specified by:
run in interface java.lang.Runnable

setDeviceListener

public void setDeviceListener(DeviceListener deviceListener)
Sets the device listener value.

Parameters:
deviceListener - The device listener (DeviceListener) parameter.
See Also:
addDeviceListener(DeviceListener), getDeviceListener(), getMultiplexDeviceListener(), removeDeviceListener(DeviceListener)

setReadTimeout

public void setReadTimeout(long readTimeout)
Sets the read timeout value.

Parameters:
readTimeout - The read timeout (long) parameter.
See Also:
getReadTimeout()

setRunning

public void setRunning(boolean running)
Sets the running value.

Parameters:
running - The running (boolean) parameter.
See Also:
isRunning()

setStarted

public void setStarted(boolean started)
Sets the started value.

Parameters:
started - The started (boolean) parameter.
See Also:
isStarted()

setThread

public void setThread(java.lang.Thread thread)
Sets the thread value.

Parameters:
thread - The thread (Thread) parameter.
See Also:
getThread()

start

public void start()
Perform the start action method.

Specified by:
start in interface DeviceService
Overrides:
start in class Container
See Also:
DeviceService.start()

startup

public void startup(boolean output)
Startup with the specified output parameter. The output (boolean)

Parameters:
output - The output (boolean) parameter.

stop

public void stop()
Perform the stop action method.

Specified by:
stop in interface DeviceService
Overrides:
stop in class Container
See Also:
DeviceService.stop()

2009-01-09 1.2.0

Copyright (c) 2009 IBM. See license in Legal section.