2009-01-09 1.2.0

org.eclipse.soda.dk.wire
Class Wire

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.wire.Wire
All Implemented Interfaces:
CommandListener, MultiplexCommandListener, ControlService, MeasurementListener, MultiplexMeasurementListener, MultiplexSignalListener, SignalListener, ErrorListener

public class Wire
extends Control
implements MultiplexMeasurementListener, MultiplexCommandListener, MultiplexSignalListener

The Wire class implements the MeasurementListener interface.

Since:
1.0
Version:
1.2.0
See Also:
Control, CommandListener, ControlService, ErrorListener, MeasurementListener, MessageHandler, SignalListener, TransformService

Field Summary
 
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
 
Constructor Summary
Wire(java.lang.String key, ControlService source, ControlService target, TransformService transform)
          Constructs an Wire object using the input parameter(s).
 
Method Summary
 void addSourceListener(ControlService source)
          Adds the specified listener to receive listener notification.
 void commandExecuted(CommandService source, java.lang.Object timestamp, ChannelService channel, java.lang.Object data)
          Command executed with the specified source, timestamp, channel and data parameters.
 void commandExecuted(CommandService source, java.lang.Object timestamp, java.lang.Object data)
          This method is fired to all Listeners each time the command is executed.
 void execute(ChannelService channel, java.lang.Object data)
          Execute with the specified channel and data parameters.
 void execute(java.lang.Object data)
          Perform the execute action method.
 ControlService getSource()
          Gets the ControlService source property value.
 ControlService getTarget()
          Gets the ControlService target property value.
 TransformService getTransform()
          Gets the transform (TransformService) value.
 void measurementChanged(MeasurementService source, java.lang.Object timestamp, ChannelService channel, java.lang.Object newValue, java.lang.Object oldValue)
          Measurement changed with the specified source, timestamp, channel, new value and old value parameters.
 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.
protected  void setSource(ControlService source)
          Sets the source value.
protected  void setTarget(ControlService target)
          Sets the target value.
 void setTransform(TransformService transform)
          Sets the transform value.
 void signalOccurred(SignalService source, java.lang.Object timestamp, ChannelService channel, java.lang.Object data)
          Signal occurred with the specified source, timestamp, channel and data parameters.
 void signalOccurred(SignalService source, java.lang.Object timestamp, java.lang.Object data)
          This method is fired to all Listeners each time the signal triggered.
 
Methods inherited from class org.eclipse.soda.dk.device.Control
attemptRecoveryFromError, equalsValue, errorOccurred, findMethod, getCodeKey, getErrorSeverity, getKey, getQualifiedKey, getResource, setKey, setQualifiedKey, toString
 
Methods inherited from class org.eclipse.soda.dk.core.EscObject
createBoolean, createDefaultLogService, createException, createException, createInteger, createIntegerTable, createLong, createLongTable, createNumber, format, getBoolean, getByte, getChar, getConfigurationService, getCurrentTimestamp, getDefaultLogService, getDefaultResource, getDouble, getFloat, getId, getIdName, getInt, getLoadLibraryName, getLogDetails, getLogDetails, getLogDetails0, getLogDetails1, getLogDetails2, getLogDetails3, getLogDetails4, getLogDetails5, getLogDetails6, getLogDetails7, getLogLevel, getLogService, getLong, getObject, getOutputName, getReadOnlyEmptyCollection, getReadOnlyEmptyList, getReadOnlyEmptyMap, getShort, getSimpleClassName, getStaticBoolean, getStaticByte, getStaticChar, getStaticDouble, getStaticFloat, getStaticInt, getStaticLong, getStaticObject, getStaticShort, getStaticString, getString, 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, toStringInfo
 
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.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
 

Constructor Detail

Wire

public Wire(java.lang.String key,
            ControlService source,
            ControlService target,
            TransformService transform)
Constructs an Wire object using the input parameter(s).

Parameters:
key - The key (String) parameter.
source - The source (ControlService) parameter.
target - The target (ControlService) parameter.
transform - The transform (TransformService) parameter.
Method Detail

addSourceListener

public void addSourceListener(ControlService source)
Adds the specified listener to receive listener notification.

Parameters:
source - The source (ControlService) parameter.

commandExecuted

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

Specified by:
commandExecuted in interface MultiplexCommandListener
Parameters:
source - The source (CommandService) parameter.
timestamp - The time stamp (Object) parameter.
channel - The channel (ChannelService) parameter.
data - The data (Object) parameter.
Since:
1.2
See Also:
commandExecuted(CommandService,Object,Object)

commandExecuted

public void commandExecuted(CommandService source,
                            java.lang.Object timestamp,
                            java.lang.Object data)
This method is fired to all Listeners each time the command is executed. Since other notifications are blocked until this method returns, implementors of this method should:

Specified by:
commandExecuted in interface CommandListener
Parameters:
source - The source (CommandService) parameter.
timestamp - The time stamp (Object) parameter.
data - The data (Object) parameter.
See Also:
commandExecuted(CommandService,Object,ChannelService,Object)

execute

public void execute(ChannelService channel,
                    java.lang.Object data)
Execute with the specified channel and data parameters.

Parameters:
channel - The channel (ChannelService) parameter.
data - The data (Object) parameter.
Since:
1.2
See Also:
execute(Object)

execute

public void execute(java.lang.Object data)
Perform the execute action method.

Parameters:
data - The data (Object) parameter.
See Also:
execute(ChannelService,Object)

getSource

public ControlService getSource()
Gets the ControlService source property value.

Returns:
Results of the get source (ControlService) value.
See Also:
setSource(ControlService)

getTarget

public ControlService getTarget()
Gets the ControlService target property value.

Returns:
Results of the get target (ControlService) value.
See Also:
setTarget(ControlService)

getTransform

public TransformService getTransform()
Gets the transform (TransformService) value.

Returns:
The transform (TransformService) value.
See Also:
setTransform(TransformService)

measurementChanged

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

Specified by:
measurementChanged in interface MultiplexMeasurementListener
Parameters:
source - The source (MeasurementService) parameter.
timestamp - The time stamp (Object) parameter.
channel - The channel (ChannelService) parameter.
newValue - The new value (Object) parameter.
oldValue - The old value (Object) parameter.
Since:
1.2
See Also:
measurementChanged(MeasurementService,Object,Object,Object)

measurementChanged

public 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. Since other notifications are blocked until this method returns, implementors of this method should:

Specified by:
measurementChanged in interface MeasurementListener
Parameters:
source - The source (MeasurementService) parameter.
timestamp - The time stamp (Object) parameter.
newValue - The new value (Object) parameter.
oldValue - The old value (Object) parameter.
See Also:
measurementChanged(MeasurementService,Object,ChannelService,Object,Object)

setSource

protected void setSource(ControlService source)
Sets the source value.

Parameters:
source - The source (ControlService) parameter.
See Also:
getSource()

setTarget

protected void setTarget(ControlService target)
Sets the target value.

Parameters:
target - The target (ControlService) parameter.
See Also:
getTarget()

setTransform

public void setTransform(TransformService transform)
Sets the transform value.

Parameters:
transform - The transform (TransformService) parameter.
See Also:
getTransform()

signalOccurred

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

Specified by:
signalOccurred in interface MultiplexSignalListener
Parameters:
source - The source (SignalService) parameter.
timestamp - The time stamp (Object) parameter.
channel - The channel (ChannelService) parameter.
data - The data (Object) parameter.
Since:
1.2
See Also:
signalOccurred(SignalService,Object,Object)

signalOccurred

public void signalOccurred(SignalService source,
                           java.lang.Object timestamp,
                           java.lang.Object data)
This method is fired to all Listeners each time the signal triggered. The signal can be triggered when a message is received from the hardware or when the trigger method is invoked by the application. Since other notifications are blocked until this method returns, implementors of this method should:

Specified by:
signalOccurred in interface SignalListener
Parameters:
source - The source (SignalService) parameter.
timestamp - The time stamp (Object) parameter.
data - The data (Object) parameter.
See Also:
signalOccurred(SignalService,Object,ChannelService,Object)

2009-01-09 1.2.0

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