1.0.0

org.eclipse.soda.dk.profile
Class Profile

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
                  extended by org.eclipse.soda.dk.profile.Profile
All Implemented Interfaces:
java.lang.Runnable, CommandListener, ControlService, DeviceListener, DeviceService, MeasurementListener, ProfileService, SignalListener, ErrorListener
Direct Known Subclasses:
DeviceProfile

public class Profile
extends Device
implements ProfileService, CommandListener, SignalListener, MeasurementListener, DeviceListener

Version:
1.0.0

Field Summary
protected  DeviceService device
          Define the device (DeviceService) field.
 
Fields inherited from class org.eclipse.soda.dk.device.Device
POLL_COMMAND_NAME, START_COMMAND_NAME, STARTED_MASK, STOP_COMMAND_NAME
 
Fields inherited from class org.eclipse.soda.dk.device.Container
capabilities, 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, MESSAGE_RECEIVED_EXCEPTION_RESOURCE, PROCESSING_UNABLE_TO_KEEP_UP_EXCEPTION_RESOURCE, RUN_EXCEPTION_RESOURCE, SEND_EXCEPTION_RESOURCE, stateChanaged, status, TOPIC_DELIMITER
 
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
 
Fields inherited from interface org.eclipse.soda.dk.profile.service.ProfileService
ACTIVE, ALIVE, Capabilities, CAPABILITIES_EXTERNAL_KEY, CAPABILITIES_GET_EXTERNAL_KEY, CAPABILITIES_READ_EXTERNAL_KEY, CAPABILITIES_WRITE_EXTERNAL_KEY, Configuration, CONFIGURATION_EXTERNAL_KEY, CONFIGURATION_GET_EXTERNAL_KEY, CONFIGURATION_READ_EXTERNAL_KEY, CONFIGURATION_WRITE_EXTERNAL_KEY, CONNECTED, CREATED, DEAD, SERVICE_NAME, STARTED, STATE_DATA_KEY, STATE_OLD_DATA_KEY, Status, STATUS_EXTERNAL_KEY, STATUS_GET_EXTERNAL_KEY, STATUS_READ_EXTERNAL_KEY, STATUS_WRITE_EXTERNAL_KEY
 
Fields inherited from interface org.eclipse.soda.dk.device.service.DeviceListener
ADDED, CHANGED, REMOVED
 
Fields inherited from interface org.eclipse.soda.dk.device.service.DeviceService
ACTIVE, ALIVE, ALL_COMMANDS, ALL_MEASUREMENTS, ALL_SIGNALS, AUTOSTART, BLOCKPROCESSING, Capabilities, CAPABILITIES_EXTERNAL_KEY, CAPABILITIES_GET_EXTERNAL_KEY, CAPABILITIES_READ_EXTERNAL_KEY, CAPABILITIES_WRITE_EXTERNAL_KEY, 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, NULL, 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
  Profile()
          Constructs an instance of this class.
protected Profile(java.lang.String capabilities, java.lang.String status, java.lang.String configuration)
          Constructs an instance of this class from the specified capabilities, status and configuration parameters.
 
Method Summary
 void commandExecuted(CommandService source, java.lang.Object timestamp, java.lang.Object data)
          Command executed with the specified source, timestamp and data parameters.
 void controlChanged(DeviceService device, java.lang.Object timestamp, ControlService control, int code)
          Control changed with the specified device, timestamp, control and code parameters.
 void deviceChanged(DeviceService source, java.lang.Object timestamp, int newState, int oldState)
          Device changed with the specified source, timestamp, new state and old state parameters.
 void deviceChangedCustom(DeviceService source, java.lang.Object timestamp, int newState, int oldState)
          Device changed custom with the specified source, timestamp, new state and old state parameters.
 void exit()
          Exit.
 java.lang.Boolean getBooleanValue(java.lang.Object value)
          Get boolean value with the specified value parameter and return the Boolean result.
 DeviceService getDefaultDevice()
          Gets the default device (DeviceService) value.
 java.lang.String getDefaultKey()
          Gets the default key (String) value.
 DeviceService getDevice()
          Gets the device (DeviceService) value.
 java.lang.Object getLogDetails6()
          Gets the log details6 (Object) value.
 java.lang.Long getLongValue(java.lang.Object value)
          Get long value with the specified value parameter and return the Long result.
 java.lang.String getResource(int resourceId)
          Get resource with the specified resource id parameter and return the String result.
 TransportService getTransport()
          Gets the transport (TransportService) value.
protected  void initialize(java.lang.String capabilities, java.lang.String status, java.lang.String configuration)
          Initialize with the specified capabilities, status and configuration parameters.
 void initializeCommand(CommandService command)
          Initialize command with the specified command parameter.
 void initializeMeasurement(MeasurementService measurement)
          Initialize measurement with the specified measurement parameter.
 void initializeSignal(SignalService signal)
          Initialize signal with the specified signal parameter.
 boolean isDeviceNeeded()
          Gets the device needed (boolean) value.
 boolean isStarted()
          Gets the started (boolean) value.
 void measurementChanged(MeasurementService source, java.lang.Object timestamp, java.lang.Object newValue, java.lang.Object oldValue)
          Measurement changed with the specified source, timestamp, new value and old value parameters.
 void setDevice(DeviceService device)
          Sets the device value.
 void setDeviceCustom(DeviceService device)
          Sets the device custom value.
 void setState(int state)
          Sets the state value.
 void setup()
          Setup.
 void signalOccurred(SignalService source, java.lang.Object timestamp, java.lang.Object data)
          Signal occurred with the specified source, timestamp and data parameters.
 
Methods inherited from class org.eclipse.soda.dk.device.Device
addDeviceListener, controlAdded, controlRemoved, finalize, fireContainerChanged, fireErrorOccurred, getCapabilities, getConfiguration, getDeviceListener, getMessageCapacity, getMessageKey, getPriority, getReadTimeout, getStatus, getThread, hasListeners, isAutoStart, isBlockProcessing, isEvenProcessing, isRunning, isThreadNeeded, load, put, remove, removeDeviceListener, restart, run, setDeviceListener, setReadTimeout, setRunning, setStarted, setThread, start, startup, stop
 
Methods inherited from class org.eclipse.soda.dk.device.Container
activate, addQualifiedKeys, attemptRecoveryFromError, broadcast, broadcastStatus, broadcastStatus, changeIds, createFilter, deactivate, elements, errorOccurred, get, getBundleContext, getCommand, getConfigurationInformation, getConfigurationInformation, getConfigurationService, getControlCapacity, getControls, getDefaultStyle, getErrorSeverity, getId, getInformation, getLogDetails4, getLogDetails5, getMeasurement, getNotificationController, getNotificationService, getPrefix, getSignal, getState, getStatusDictionary, getString, getStyle, initializeMeasurements, isInitializeMeasurements, keys, notificationReceived, prependPrefix, prependPrefix, put, putConfigurationInformation, register, register, removeListeners, removeQualifiedKeys, send, setBundleContext, setConfigurationInformation, setInformation, setListenersNull, setNotificationController, setNotificationService, setStyle, setTransport, setupCustom, setupNotification, setupNotificationCustom, startupCommands, toString, toStringInfo, transportStartedWait, unregister, unsubscribe
 
Methods inherited from class org.eclipse.soda.dk.device.Control
equalsValue, getCodeKey, getKey, getQualifiedKey, setKey, setQualifiedKey
 
Methods inherited from class org.eclipse.soda.dk.core.EscObject
createDefaultLogService, createException, createException, createInteger, createIntegerTable, createNumber, format, getBoolean, getCurrentTimestamp, getDefaultLogService, getDefaultResource, getFloat, getInt, getLoadLibraryName, getLogDetails, getLogDetails0, getLogDetails1, getLogDetails2, getLogDetails3, getLogDetails7, getLogService, getLong, getObject, getOutputName, getSimpleClassName, getStaticBoolean, getStaticFloat, getStaticInt, getStaticLong, getStaticObject, getStaticString, getTraceLevel, getVmLibraryVersion, handleError, handleError, handleError, handleStaticError, handleStaticException, isDebug, isTrace, loadService, log, log, report, report, report, report, report, report, reportError, reportSystemInfo, setDebug, setDefaultLogService, setLogService, setTraceLevel, 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.profile.service.ProfileService
getConfigurationInformation, getKey, getNotificationService, getState, setConfigurationInformation, setNotificationService, start, stop
 
Methods inherited from interface org.eclipse.soda.dk.transport.service.ErrorListener
errorOccurred
 
Methods inherited from interface org.eclipse.soda.dk.transport.service.ErrorListener
errorOccurred
 
Methods inherited from interface org.eclipse.soda.dk.transport.service.ErrorListener
errorOccurred
 
Methods inherited from interface org.eclipse.soda.dk.transport.service.ErrorListener
errorOccurred
 
Methods inherited from interface org.eclipse.soda.dk.device.service.DeviceService
elements, get, getCommand, getConfigurationInformation, getMeasurement, getNotificationService, getSignal, getState, send, setConfigurationInformation, setNotificationService, setTransport
 
Methods inherited from interface org.eclipse.soda.dk.device.service.ControlService
getKey
 

Field Detail

device

protected DeviceService device
Define the device (DeviceService) field.

Constructor Detail

Profile

public Profile()
Constructs an instance of this class.

See Also:
Profile(String,String,String)

Profile

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

See Also:
Profile()
Method Detail

commandExecuted

public void commandExecuted(CommandService source,
                            java.lang.Object timestamp,
                            java.lang.Object data)
Command executed with the specified source, timestamp and data parameters. The source (CommandService) parameter. The timestamp (Object) parameter. The data (Object) parameter. The source (CommandService) parameter. The timestamp (Object) parameter. The data (Object) parameter.

Specified by:
commandExecuted in interface CommandListener
Parameters:
source - CommandService which was executed.
timestamp - The time at which the command execution was detected.
data - Any data which was contained within the command.

controlChanged

public void controlChanged(DeviceService device,
                           java.lang.Object timestamp,
                           ControlService control,
                           int code)
Control changed with the specified device, timestamp, control and code parameters. The device (DeviceService) parameter. The timestamp (Object) parameter. The control (ControlService) parameter. The code (int) parameter. The device (DeviceService) parameter. The timestamp (Object) parameter. The control (ControlService) parameter. The code (int) parameter.

Specified by:
controlChanged in interface DeviceListener
Parameters:
device - org.eclipse.soda.dk.device.service.DeviceService
timestamp - java.lang.Object
control - org.eclipse.soda.dk.device.service.ControlService
code - int
See Also:
deviceChanged(DeviceService,Object,int,int), measurementChanged(MeasurementService,Object,Object,Object)

deviceChanged

public void deviceChanged(DeviceService source,
                          java.lang.Object timestamp,
                          int newState,
                          int oldState)
Device changed with the specified source, timestamp, new state and old state parameters. The source (DeviceService) parameter. The timestamp (Object) parameter. The new state (int) parameter. The old state (int) parameter. The source (DeviceService) parameter. The timestamp (Object) parameter. The new state (int) parameter. The old state (int) parameter.

Specified by:
deviceChanged in interface DeviceListener
Parameters:
source - org.eclipse.soda.dk.device.service.DeviceService
timestamp - java.lang.Object
newState - The new state of the DeviceService when the notification process started.
oldState - The old state of the DeviceService.
See Also:
controlChanged(DeviceService,Object,ControlService,int), measurementChanged(MeasurementService,Object,Object,Object)

deviceChangedCustom

public void deviceChangedCustom(DeviceService source,
                                java.lang.Object timestamp,
                                int newState,
                                int oldState)
Device changed custom with the specified source, timestamp, new state and old state parameters. The source (DeviceService) parameter. The timestamp (Object) parameter. The new state (int) parameter. The old state (int) parameter. The source (DeviceService) parameter. The timestamp (Object) parameter. The new state (int) parameter. The old state (int) parameter.


exit

public void exit()
Exit.

Specified by:
exit in interface DeviceService
Specified by:
exit in interface ProfileService
Overrides:
exit in class Container

getBooleanValue

public java.lang.Boolean getBooleanValue(java.lang.Object value)
Get boolean value with the specified value parameter and return the Boolean result. The value (Object) parameter.

Returns:
Results of the get boolean value (Boolean) value. The value (Object) parameter.

getDefaultDevice

public DeviceService getDefaultDevice()
Gets the default device (DeviceService) value.

Returns:
The default device (DeviceService) value.

getDefaultKey

public java.lang.String getDefaultKey()
Gets the default key (String) value.

Overrides:
getDefaultKey in class Device
Returns:
The default key (String) value.
See Also:
Container.getDefaultKey()

getDevice

public DeviceService getDevice()
Gets the device (DeviceService) value.

Returns:
The device (DeviceService) value.
See Also:
getDefaultDevice(), setDevice(DeviceService)

getLogDetails6

public java.lang.Object getLogDetails6()
Gets the log details6 (Object) value.

Overrides:
getLogDetails6 in class Container
Returns:
The log details6 (Object) value.

getLongValue

public java.lang.Long getLongValue(java.lang.Object value)
Get long value with the specified value parameter and return the Long result. The value (Object) parameter.

Returns:
Results of the get long value (Long) value.

getResource

public java.lang.String getResource(int resourceId)
Get resource with the specified resource id parameter and return the String result. The resource id (int) parameter.

Overrides:
getResource in class Control
Parameters:
resourceId - The resource id (int) parameter.
Returns:
Results of the get resource (String) value.
See Also:
EscObject.getDefaultResource(int)

getTransport

public TransportService getTransport()
Gets the transport (TransportService) value.

Specified by:
getTransport in interface DeviceService
Overrides:
getTransport in class Container
Returns:
The transport (TransportService) value.
See Also:
DeviceService.getTransport(), Container.setTransport(TransportService)

initialize

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


initializeCommand

public void initializeCommand(CommandService command)
Initialize command with the specified command parameter. The command (CommandService) parameter. The command (CommandService) parameter.


initializeMeasurement

public void initializeMeasurement(MeasurementService measurement)
Initialize measurement with the specified measurement parameter. The measurement (MeasurementService) parameter. The measurement (MeasurementService) parameter.


initializeSignal

public void initializeSignal(SignalService signal)
Initialize signal with the specified signal parameter. The signal (SignalService) parameter. The signal (SignalService) parameter.


isDeviceNeeded

public boolean isDeviceNeeded()
Gets the device needed (boolean) value.

Returns:
The device needed (boolean) value.

isStarted

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

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

measurementChanged

public void measurementChanged(MeasurementService source,
                               java.lang.Object timestamp,
                               java.lang.Object newValue,
                               java.lang.Object oldValue)
Measurement changed with the specified source, timestamp, new value and old value parameters. The source (MeasurementService) parameter. The timestamp (Object) parameter. The new value (Object) parameter. The old value (Object) parameter. The source (MeasurementService) parameter. The timestamp (Object) parameter. The new value (Object) parameter. The old value (Object) parameter.

Specified by:
measurementChanged in interface MeasurementListener
Parameters:
source - MeasurementService which changed.
timestamp - The time at which the value change was detected.
newValue - The new value of the MeasurementService.
oldValue - The old value of the MeasurementService.
See Also:
controlChanged(DeviceService,Object,ControlService,int), deviceChanged(DeviceService,Object,int,int)

setDevice

public void setDevice(DeviceService device)
Sets the device value. The device (DeviceService) parameter. The device (DeviceService) parameter.

See Also:
getDefaultDevice(), getDevice()

setDeviceCustom

public void setDeviceCustom(DeviceService device)
Sets the device custom value. The device (DeviceService) parameter.


setState

public void setState(int state)
Sets the state value. The state (int) parameter. The state (int) parameter.

Overrides:
setState in class Container
Parameters:
state - The state (int) parameter.
See Also:
Container.getState()

setup

public void setup()
Setup.

Overrides:
setup in class Container

signalOccurred

public void signalOccurred(SignalService source,
                           java.lang.Object timestamp,
                           java.lang.Object data)
Signal occurred with the specified source, timestamp and data parameters. The source (SignalService) parameter. The timestamp (Object) parameter. The data (Object) parameter. The source (SignalService) parameter. The timestamp (Object) parameter. The data (Object) parameter.

Specified by:
signalOccurred in interface SignalListener
Parameters:
source - The SignalService which fired.
timestamp - The time at which the signal was detected.
data - Contains any data which was contained within the signal.

1.0.0

Copyright (c) 1999, 2007 IBM