2009-01-09 1.2.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.

Since:
1.0
Version:
1.2.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 SET_VALUE_EXCEPTION_RESOURCE
          Define the set value exception 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, 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
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)
          Attempt recovery from error with the specified error number and error parameters and return the boolean result.
 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.reflect.Method findMethod(java.lang.Class target, java.lang.String methodName, java.lang.Class[] parameters)
          Find method with the specified target, method name and parameters parameters and return the Method result.
 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 value.
 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
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
 

Field Detail

SET_VALUE_EXCEPTION_RESOURCE

protected static final int SET_VALUE_EXCEPTION_RESOURCE
Define the set value exception resource (int) constant.

Since:
1.2
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)
Attempt recovery from error with the specified error number and error parameters and return the boolean result.

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.

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 time stamp (Object) parameter.
data - The data (Object) parameter.

findMethod

public java.lang.reflect.Method findMethod(java.lang.Class target,
                                           java.lang.String methodName,
                                           java.lang.Class[] parameters)
                                    throws java.lang.SecurityException,
                                           java.lang.NoSuchMethodException
Find method with the specified target, method name and parameters parameters and return the Method result.

Parameters:
target - The target (Class) parameter.
methodName - The method name (String) parameter.
parameters - The parameters (Class[]) parameter.
Returns:
Results of the find method (Method) value.
Throws:
java.lang.SecurityException - Security Exception.
java.lang.NoSuchMethodException - No Such Method Exception.

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:
EscObject.getErrorSeverity(int,Throwable)

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.

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 value.

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.

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)

2009-01-09 1.2.0

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