1.0.0

org.eclipse.soda.dk.device
Class Control

java.lang.Object
  extended by org.eclipse.soda.dk.core.EscObject
      extended by org.eclipse.soda.dk.device.Control
All Implemented Interfaces:
ControlService, ErrorListener
Direct Known Subclasses:
Command, Container, Measurement, Signal, Wire

public class Control
extends EscObject
implements ControlService, ErrorListener

The Control class implements the ControlService interface.

Version:
1.0.0
See Also:
ControlService, ErrorListener, MessageHandler, String

Field Summary
protected static int EXCEPTION_READ_FAILED_RESOURCE
          Define the exception read failed resource (int) constant.
protected static int SETVALUEEXCEPTION_RESOURCE
          Define the setvalueexception resource (int) constant.
 
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
 
Constructor Summary
Control()
          Constructs an Control object.
Control(java.lang.String key)
          Constructs an Control object using the input parameter(s).
 
Method Summary
protected  boolean attemptRecoveryFromError(int errorNumber, java.lang.Throwable error)
          Returns true if attempt recovery from error.
 boolean equalsValue(java.lang.Object value, java.lang.Object value2)
          Perform the equalsValue method and return the boolean result.
 void errorOccurred(java.lang.Object source, java.lang.Object timestamp, java.lang.Object data)
          The errorOccurred method is called when an error has occurred.
 java.lang.String getCodeKey()
          Gets the code key (String) value.
protected  int getErrorSeverity(int errorNumber, java.lang.Throwable error)
          Return the error severity of the specified error number.
 java.lang.String getKey()
          Gets the String key property value.
 java.lang.String getQualifiedKey()
          Gets the qualified key (String) value.
 java.lang.String getResource(int resourceId)
          Gets the string resource using the supplied resourceId.
protected  void setKey(java.lang.String key)
          Sets the key property.
 java.lang.String setQualifiedKey(java.lang.String qualifiedKey)
          Sets the qualified key value.
 java.lang.String toString()
          Perform the toString method and return the String result.
 
Methods inherited from class org.eclipse.soda.dk.core.EscObject
createDefaultLogService, createException, createException, createInteger, createIntegerTable, createNumber, format, getBoolean, getConfigurationService, getCurrentTimestamp, getDefaultLogService, getDefaultResource, getFloat, getInt, getLoadLibraryName, getLogDetails, getLogDetails0, getLogDetails1, getLogDetails2, getLogDetails3, getLogDetails4, getLogDetails5, getLogDetails6, getLogDetails7, getLogService, getLong, getObject, getOutputName, getSimpleClassName, getStaticBoolean, getStaticFloat, getStaticInt, getStaticLong, getStaticObject, getStaticString, getString, 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, toStringInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SETVALUEEXCEPTION_RESOURCE

protected static final int SETVALUEEXCEPTION_RESOURCE
Define the setvalueexception resource (int) constant.

See Also:
Constant Field Values

EXCEPTION_READ_FAILED_RESOURCE

protected static final int EXCEPTION_READ_FAILED_RESOURCE
Define the exception read failed resource (int) constant.

See Also:
Constant Field Values
Constructor Detail

Control

public Control()
Constructs an Control object.

See Also:
Control(String)

Control

public Control(java.lang.String key)
Constructs an Control object using the input parameter(s). java.lang.String

Parameters:
key - The key (String) parameter.
See Also:
Control()
Method Detail

attemptRecoveryFromError

protected boolean attemptRecoveryFromError(int errorNumber,
                                           java.lang.Throwable error)
Description copied from class: EscObject
Returns true if attempt recovery from error.

Overrides:
attemptRecoveryFromError in class EscObject
Parameters:
errorNumber - The error number (int) parameter.
error - The error (Throwable) parameter.
Returns:
Results of the attempt recovery from error (boolean) value.
See Also:
The error number (int) parameter. The error (Throwable) parameter.

equalsValue

public boolean equalsValue(java.lang.Object value,
                           java.lang.Object value2)
Perform the equalsValue method and return the boolean result. java.lang.Object java.lang.Object

Parameters:
value - The value (Object) parameter.
value2 - The value2 (Object) parameter.
Returns:
Results of the equals value (boolean) value.

errorOccurred

public void errorOccurred(java.lang.Object source,
                          java.lang.Object timestamp,
                          java.lang.Object data)
The errorOccurred method is called when an error has occurred. Since other notifications are blocked until this method returns, implementors of this method should: The source object that detected the error. The time at which the error was detected. Contains any data about the error.

Specified by:
errorOccurred in interface ErrorListener
Parameters:
source - The source (Object) parameter.
timestamp - The timestamp (Object) parameter.
data - The data (Object) parameter.

getCodeKey

public java.lang.String getCodeKey()
Gets the code key (String) value.

Returns:
The code key (String) value.

getErrorSeverity

protected int getErrorSeverity(int errorNumber,
                               java.lang.Throwable error)
Description copied from class: EscObject
Return the error severity of the specified error number.

Overrides:
getErrorSeverity in class EscObject
Parameters:
errorNumber - The error number (int) parameter.
error - The error (Throwable) parameter.
Returns:
Results of the get error severity (int) value.
See Also:
The error number (int) parameter. The error (Throwable) parameter.

getKey

public java.lang.String getKey()
Gets the String key property value.

Specified by:
getKey in interface ControlService
Returns:
Results of the get key (String) value.
See Also:
ControlService.getKey(), getCodeKey(), getQualifiedKey(), setKey(String), setQualifiedKey(String)

getQualifiedKey

public java.lang.String getQualifiedKey()
Gets the qualified key (String) value.

Returns:
The qualified key (String) value.
See Also:
setQualifiedKey(String)

getResource

public java.lang.String getResource(int resourceId)
Gets the string resource using the supplied resourceId. The resource id (int) parameter.

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

setKey

protected void setKey(java.lang.String key)
Sets the key property. The new property value (java.lang.String).

Parameters:
key - The key (String) parameter.
See Also:
getCodeKey(), getKey(), getQualifiedKey(), setQualifiedKey(String)

setQualifiedKey

public java.lang.String setQualifiedKey(java.lang.String qualifiedKey)
Sets the qualified key value. The qualified key (String) parameter.

Parameters:
qualifiedKey - The qualified key (String) parameter.
Returns:
The qualified key (String) value.
See Also:
getQualifiedKey()

toString

public java.lang.String toString()
Perform the toString method and return the String result.

Overrides:
toString in class EscObject
Returns:
Results of the to string (String) value.
See Also:
EscObject.getStaticString(String,String), EscObject.getString(String,String)

1.0.0

Copyright (c) 1999, 2007 IBM