2009-01-09 1.2.0

org.eclipse.soda.dk.core
Class EscObject

java.lang.Object
  extended by org.eclipse.soda.dk.core.EscObject
Direct Known Subclasses:
BaseParameter, CommandListeners, ComplexStreamParameter, ConfigurableObject, Connection, Control, DeviceListeners, LdapFilterScript, MeasurementListeners, org.eclipse.soda.dk.notification.client.NotificationClient, NotificationController, Parameter, ParameterCursor, ProfileListeners, Script6, ScriptManager, ScriptObject, SignalListeners, StreamParameter, Transform, TransportTest

public abstract class EscObject
extends java.lang.Object

Version:
1.2.0

Field Summary
static int CLONE_EXCEPTION_RESOURCE
          Define the clone exception resource ID.
static byte[] EMPTY_BYTES
          Define an empty byte array.
static java.lang.String EMPTY_STRING
          Define the empty string (String) constant.
static int ERROR_OCCURRED_EXCEPTION_RESOURCE
          Define the error occurred exception resource ID.
static java.lang.String ID_FILTER_KEY
          Define the id filter key (String) constant.
static java.lang.String ID_KEY
          Define the id key (String) constant.
static java.lang.String ID_KEY_ANY
          Define the id key any (String) constant.
static java.lang.String ID_NAME_KEY
          Define the id name key (String) constant.
static java.lang.Integer[] INTEGER_TABLE
          Define the integer table (Integer[]) constant.
static int INTEGER_TABLE_SIZE
          Define the integer table size (int) constant.
static java.lang.String KEY_KEY
          Define the key key (String) constant.
static int LOG_DEBUG
          Define the log Debug (int) constant.
static int LOG_DEFAULT
          Define the log default (int) constant.
static int LOG_ERROR
          Define the log error (int) constant.
static int LOG_INFO
          Define the log info (int) constant.
static java.lang.String LOG_LEVEL_KEY
          Define the log level key (String) constant.
static int LOG_TRACE
          Define the log trace (int) constant.
static int LOG_WARNING
          Define the log warning (int) constant.
static java.lang.Long[] LONG_TABLE
          Define the long table (Long[]) constant.
static int LONG_TABLE_SIZE
          Define the long table size (int) constant.
static java.lang.String PREFIX_KEY
          Define the prefix key (String) constant.
static java.util.List READONLY_EMPTY_COLLECTION
          Define the read only empty collection (List) constant.
static java.util.List READONLY_EMPTY_LIST
          Define the read only empty list (List) constant.
static java.util.Map READONLY_EMPTY_MAP
          Define the read only empty map (Map) constant.
static java.lang.String RESOURCE_BUNDLE
          Define the resource bundle (String) constant.
static int SLEEP_EXCEPTION_RESOURCE
          Define the sleep exception resource ID.
static int SYSTEM_INFO_RESOURCE
          Define the system info resource (int) constant.
static java.lang.String[] TO_STRING_CONFIGURATION_KEYS
          Define the to string configuration keys (String[]) constant.
static int TRACE_LEVEL_HIGH
          Define the trace level high (int) constant.
static int TRACE_LEVEL_LOW
          Define the trace level low (int) constant.
static int TRACE_LEVEL_MAX
          Define the trace level max (int) constant.
static int TRACE_LEVEL_MIN
          Define the trace level minimum (int) constant.
static int TRACE_LEVEL_NONE
          Define the trace level none (int) constant.
static int TRACE_LEVEL_NORMAL
          Define the trace level normal (int) constant.
static java.lang.String TRACELEVEL_KEY
          Define the trace level key (String) constant.
static int UNKNOWN_ERROR_RESOURCE
          Define the unknown error resource ID.
protected static boolean Unmodifiable
          Define the unmodifiable (boolean) field.
 
Constructor Summary
protected EscObject()
          Constructs an instance of this class.
 
Method Summary
protected  boolean attemptRecoveryFromError(int errorNumber, java.lang.Throwable error)
          Returns true if attempt recovery from error.
static java.lang.Boolean createBoolean(boolean value)
          Create boolean with the specified value parameter and return the Boolean result.
static org.osgi.service.log.LogService createDefaultLogService()
          Create default log service and return the LogService result.
 java.lang.RuntimeException createException(int resourceId)
          Create a RuntimeException from the specified resouceId.
 java.lang.RuntimeException createException(int resourceId, java.lang.Object[] objects)
          Create a RuntimeException from the specified resouceId.
static java.lang.Integer createInteger(int value)
          Create integer with the specified value parameter and return the Integer result.
protected static java.lang.Integer[] createIntegerTable(int size)
          Create integer table and return the Integer[] result.
static java.lang.Long createLong(long value)
          Create long with the specified value parameter and return the Long result.
protected static java.lang.Long[] createLongTable(int size)
          Create long table with the specified size parameter and return the Long[] result.
static java.lang.Number createNumber(long value)
          Create number with the specified value parameter and return the Number result.
 java.lang.String format(int resourceId, java.lang.Object object)
          Format the string and return formatted string.
 boolean getBoolean(java.lang.String key, boolean defaultBoolean)
          Get boolean with the specified key and default boolean parameters and return the boolean result.
 byte getByte(java.lang.String key, byte defaultByte)
          Get byte with the specified key and default byte parameters and return the byte result.
 char getChar(java.lang.String key, char defaultChar)
          Get char with the specified key and default char parameters and return the char result.
 ConfigurationService getConfigurationService()
          Gets the configuration service value.
static java.lang.Object getCurrentTimestamp()
          Gets current timestamp.
static org.osgi.service.log.LogService getDefaultLogService()
          This should always return a LogService.
static java.lang.String getDefaultResource(int resourceId)
          Get default resource with the specified resource id parameter and return the String result.
 double getDouble(java.lang.String key, double defaultDouble)
          Get double with the specified key and default double parameters and return the double result.
protected  int getErrorSeverity(int errorNumber, java.lang.Throwable error)
          Return the error severity of the specified error number.
 float getFloat(java.lang.String key, float defaultFloat)
          Get float with the specified key and default float parameters and return the float result.
 java.lang.String getId()
          Gets the ID (String) value.
 java.lang.String getIdName()
          Gets the ID name (String) value.
 int getInt(java.lang.String key, int defaultInt)
          Get int with the specified key and default int parameters and return the int result.
static java.lang.String getLoadLibraryName(java.lang.String baseName)
          Get load library name with the specified base name parameter and return the String result.
 java.lang.Object[] getLogDetails(java.lang.Throwable error, java.lang.Object details, java.lang.Object details1, java.lang.Object details2, java.lang.Object details3)
          Get log details with the specified error, details, details1, details2 and details3 parameters and return the Object[] result.
 java.lang.Object[] getLogDetails(java.lang.Throwable error, java.lang.Object details, java.lang.Object details1, java.lang.Object details2, java.lang.Object details3, java.lang.Object details4, java.lang.Object details5, java.lang.Object details6)
          Get log details with the specified error, details, details1, details2 and details3 parameters and return the Object[] result.
 java.lang.Object getLogDetails0()
          Get the log details 0.
 java.lang.Object getLogDetails1()
          Get the log details 1.
 java.lang.Object getLogDetails2()
          Get the log details 2.
 java.lang.Object getLogDetails3()
          Get the log details 3.
 java.lang.Object getLogDetails4()
          Get the log details 4.
 java.lang.Object getLogDetails5()
          Get the log details 5.
 java.lang.Object getLogDetails6()
          Get the log details 6.
 java.lang.Object getLogDetails7()
          Get the log details 7.
 int getLogLevel()
          Gets the log level (int) value.
 org.osgi.service.log.LogService getLogService()
          This should always return a valid LogService.
 long getLong(java.lang.String key, long defaultLong)
          Get long with the specified key and get long parameters and return the long result.
 java.lang.Object getObject(java.lang.String key, java.lang.Object defaultObject)
          Get object with the specified key and default object parameters and return the Object result.
 java.lang.String getOutputName()
          Gets the output name (String) value.
static java.util.Collection getReadOnlyEmptyCollection()
          Gets the read only empty collection (Collection) value.
static java.util.List getReadOnlyEmptyList()
          Gets the read only empty list (List) value.
static java.util.Map getReadOnlyEmptyMap()
          Gets the read only empty map (Map) value.
 java.lang.String getResource(int resourceId)
          Return the string resource.
 short getShort(java.lang.String key, short defaultShort)
          Get short with the specified key and default short parameters and return the short result.
 java.lang.String getSimpleClassName()
          Gets the simple class name (String) value.
static boolean getStaticBoolean(java.lang.String key, boolean defaultBoolean)
          Get static boolean with the specified key and default boolean parameters and return the boolean result.
static byte getStaticByte(java.lang.String key, byte defaultByte)
          Get static byte with the specified key and default byte parameters and return the byte result.
static char getStaticChar(java.lang.String key, char defaultChar)
          Get static char with the specified key and default char parameters and return the char result.
static double getStaticDouble(java.lang.String key, double defaultDouble)
          Get static double with the specified key and default double parameters and return the double result.
static float getStaticFloat(java.lang.String key, float defaultFloat)
          Get static float with the specified key and default float parameters and return the float result.
static int getStaticInt(java.lang.String key, int defaultInt)
          Gets the int from the configuration information.
static long getStaticLong(java.lang.String key, long defaultLong)
          Get static long with the specified key and default long parameters and return the long result.
static java.lang.Object getStaticObject(java.lang.String key, java.lang.Object defaultObject)
          Get static object with the specified key and default object parameters and return the Object result.
static short getStaticShort(java.lang.String key, short defaultShort)
          Get static short with the specified key and default short parameters and return the short result.
static java.lang.String getStaticString(java.lang.String key, java.lang.String defaultString)
          Get static string with the specified key and default string parameters and return the String result.
 java.lang.String getString(java.lang.String key, java.lang.String defaultString)
          Get string with the specified key and default string parameters and return the String result.
static int getTraceLevel()
          Gets the trace level (int) value.
static java.lang.String getVmLibraryVersion()
          Returns the VM library version.
 void handleError(java.lang.Throwable error, int resourceId)
          Handle error with the specified error and resource ID parameters.
 void handleError(java.lang.Throwable error, int resourceId, java.lang.Object details)
          Handle error with the specified error, resource id and details parameters.
protected  void handleError(java.lang.Throwable error, int resourceId, java.lang.Object[] details)
          Handle error with the specified error, resource id and details parameters.
 void handleError(java.lang.Throwable error, int resourceId, java.lang.Object details, java.lang.Object details2)
          Handle error with the specified error, resource id, details and details2 parameters.
protected  void handleErrorInternal(java.lang.Throwable error, int resourceId, java.lang.Object[] objects)
          Perform the handleError action method.
static void handleStaticError(java.lang.String string)
          Perform the handleStaticException action method.
static void handleStaticException(java.lang.Throwable exception)
          Perform the handleStaticException action method.
static boolean isBackward()
          Gets the backward (boolean) value.
static boolean isDebug()
          Gets the Debug state.
 boolean isLogging(int severity)
          Is logging with the specified severity parameter and return the boolean result.
static boolean isTrace()
          Gets the trace state.
static boolean isUnmodifiable()
          Gets the unmodifiable (boolean) value.
static java.lang.Object loadService(java.lang.String serviceName, java.lang.String defaultClassName)
          Load the specified service name.
 void log(int severity, java.lang.String message)
          Log the event.
 void log(int severity, java.lang.String message, java.lang.Throwable exception)
          Log the event.
 void log(java.lang.Throwable error, int resourceId)
          Log with the specified error and resource id parameters.
 void report(int reportNumber, java.lang.Object[] errorObjects)
          Report with the specified report number and error objects parameters.
 void report(java.lang.Throwable error, int resourceId)
          Report with the specified error and resource id parameters.
 void report(java.lang.Throwable error, int resourceId, java.lang.Object details)
          Report with the specified error, resource id and details parameters.
 void report(java.lang.Throwable error, int resourceId, java.lang.Object details, java.lang.Object details1)
          Report with the specified error, resource id, details and details1 parameters.
 void report(java.lang.Throwable error, int resourceId, java.lang.Object details, java.lang.Object details1, java.lang.Object details2)
          Report with the specified error, resource id, details, details1 and details2 parameters.
 void report(java.lang.Throwable error, int resourceId, java.lang.Object details, java.lang.Object details1, java.lang.Object details2, java.lang.Object details3)
          Report with the specified error, resource id, details, details1, details2 and details3 parameters.
 void report(java.lang.Throwable error, int resourceId, java.lang.Object details, java.lang.Object details1, java.lang.Object details2, java.lang.Object details3, java.lang.Object details4)
          Report with the specified error, resource id, details, details1, details2 and details3 parameters.
protected  void reportError(int errorNumber, java.lang.Throwable error, java.lang.Object[] errorObjects)
          Report error with the specified error number, error and error objects parameters.
 void reportSystemInfo()
          Report system info.
static void setBackward(boolean backward)
          Sets the backward value.
static void setDebug(boolean debug)
          Sets the debug value.
static void setDefaultLogService(org.osgi.service.log.LogService defaultLogService)
          Sets the default log service value.
 void setLogService(org.osgi.service.log.LogService logService)
          Set the LogService.
static void setTraceLevel(int traceLevel)
          Sets the trace level value.
static void setUnmodifiable(boolean unmodifiable)
          Sets the unmodifiable value.
static boolean shouldLog(int code)
          Returns true if the specified code should be logged.
 void sleep(long milliseconds)
          Sleep the specified number of milliseconds.
static java.lang.Long startupEscStatic()
          Startup ESC static and return the Long result.
 java.lang.String toString()
          Returns the string value.
 java.lang.String[] toStringConfigurationKeys()
          Returns the string configuration keys (String[]) value.
 void toStringInfo(java.lang.StringBuffer buffer)
          To string info with the specified buffer parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID_KEY

public static final java.lang.String ID_KEY
Define the id key (String) constant.

See Also:
Constant Field Values

ID_NAME_KEY

public static final java.lang.String ID_NAME_KEY
Define the id name key (String) constant.

See Also:
Constant Field Values

ID_FILTER_KEY

public static final java.lang.String ID_FILTER_KEY
Define the id filter key (String) constant.

See Also:
Constant Field Values

ID_KEY_ANY

public static final java.lang.String ID_KEY_ANY
Define the id key any (String) constant.

See Also:
Constant Field Values

KEY_KEY

public static final java.lang.String KEY_KEY
Define the key key (String) constant.

See Also:
Constant Field Values

PREFIX_KEY

public static final java.lang.String PREFIX_KEY
Define the prefix key (String) constant.

See Also:
Constant Field Values

LOG_LEVEL_KEY

public static final java.lang.String LOG_LEVEL_KEY
Define the log level key (String) constant.

See Also:
Constant Field Values

TO_STRING_CONFIGURATION_KEYS

public static final java.lang.String[] TO_STRING_CONFIGURATION_KEYS
Define the to string configuration keys (String[]) constant.


LOG_DEFAULT

public static final int LOG_DEFAULT
Define the log default (int) constant.

See Also:
Constant Field Values

LOG_ERROR

public static final int LOG_ERROR
Define the log error (int) constant.

See Also:
Constant Field Values

LOG_WARNING

public static final int LOG_WARNING
Define the log warning (int) constant.

See Also:
Constant Field Values

LOG_INFO

public static final int LOG_INFO
Define the log info (int) constant.

See Also:
Constant Field Values

LOG_DEBUG

public static final int LOG_DEBUG
Define the log Debug (int) constant.

See Also:
Constant Field Values

LOG_TRACE

public static final int LOG_TRACE
Define the log trace (int) constant.

See Also:
Constant Field Values

TRACE_LEVEL_NONE

public static final int TRACE_LEVEL_NONE
Define the trace level none (int) constant.

See Also:
Constant Field Values

TRACE_LEVEL_MIN

public static final int TRACE_LEVEL_MIN
Define the trace level minimum (int) constant.

See Also:
Constant Field Values

TRACE_LEVEL_LOW

public static final int TRACE_LEVEL_LOW
Define the trace level low (int) constant.

See Also:
Constant Field Values

TRACE_LEVEL_NORMAL

public static final int TRACE_LEVEL_NORMAL
Define the trace level normal (int) constant.

See Also:
Constant Field Values

TRACE_LEVEL_HIGH

public static final int TRACE_LEVEL_HIGH
Define the trace level high (int) constant.

See Also:
Constant Field Values

TRACE_LEVEL_MAX

public static final int TRACE_LEVEL_MAX
Define the trace level max (int) constant.

See Also:
Constant Field Values

EMPTY_STRING

public static final java.lang.String EMPTY_STRING
Define the empty string (String) constant.

See Also:
Constant Field Values

TRACELEVEL_KEY

public static final java.lang.String TRACELEVEL_KEY
Define the trace level key (String) constant.

See Also:
Constant Field Values

RESOURCE_BUNDLE

public static final java.lang.String RESOURCE_BUNDLE
Define the resource bundle (String) constant.

See Also:
Constant Field Values

EMPTY_BYTES

public static final byte[] EMPTY_BYTES
Define an empty byte array.


INTEGER_TABLE_SIZE

public static final int INTEGER_TABLE_SIZE
Define the integer table size (int) constant.

See Also:
Constant Field Values

INTEGER_TABLE

public static final java.lang.Integer[] INTEGER_TABLE
Define the integer table (Integer[]) constant.


LONG_TABLE_SIZE

public static final int LONG_TABLE_SIZE
Define the long table size (int) constant.

See Also:
Constant Field Values

LONG_TABLE

public static final java.lang.Long[] LONG_TABLE
Define the long table (Long[]) constant.


UNKNOWN_ERROR_RESOURCE

public static final int UNKNOWN_ERROR_RESOURCE
Define the unknown error resource ID.

See Also:
Constant Field Values

ERROR_OCCURRED_EXCEPTION_RESOURCE

public static final int ERROR_OCCURRED_EXCEPTION_RESOURCE
Define the error occurred exception resource ID.

See Also:
Constant Field Values

SLEEP_EXCEPTION_RESOURCE

public static final int SLEEP_EXCEPTION_RESOURCE
Define the sleep exception resource ID.

See Also:
Constant Field Values

CLONE_EXCEPTION_RESOURCE

public static final int CLONE_EXCEPTION_RESOURCE
Define the clone exception resource ID.

See Also:
Constant Field Values

SYSTEM_INFO_RESOURCE

public static final int SYSTEM_INFO_RESOURCE
Define the system info resource (int) constant.

See Also:
Constant Field Values

READONLY_EMPTY_MAP

public static final java.util.Map READONLY_EMPTY_MAP
Define the read only empty map (Map) constant.


READONLY_EMPTY_LIST

public static final java.util.List READONLY_EMPTY_LIST
Define the read only empty list (List) constant.


READONLY_EMPTY_COLLECTION

public static final java.util.List READONLY_EMPTY_COLLECTION
Define the read only empty collection (List) constant.


Unmodifiable

protected static boolean Unmodifiable
Define the unmodifiable (boolean) field.

Constructor Detail

EscObject

protected EscObject()
Constructs an instance of this class.

Method Detail

createBoolean

public static java.lang.Boolean createBoolean(boolean value)
Create boolean with the specified value parameter and return the Boolean result.

Parameters:
value - The value (boolean) parameter.
Returns:
Results of the create boolean (Boolean) value.
Since:
1.2
See Also:
getStaticBoolean(String,boolean), getBoolean(String,boolean)

createDefaultLogService

public static org.osgi.service.log.LogService createDefaultLogService()
Create default log service and return the LogService result.

Returns:
Results of the create default log service (LogService) value.
See Also:
getDefaultLogService(), setDefaultLogService(LogService)

createInteger

public static java.lang.Integer createInteger(int value)
Create integer with the specified value parameter and return the Integer result.

Parameters:
value - The value (int) parameter.
Returns:
Results of the create integer (Integer) value.

createIntegerTable

protected static final java.lang.Integer[] createIntegerTable(int size)
Create integer table and return the Integer[] result.

Parameters:
size - The size (int) parameter.
Returns:
Results of the create integer table (Integer[]) value.

createLong

public static java.lang.Long createLong(long value)
Create long with the specified value parameter and return the Long result.

Parameters:
value - The value (long) parameter.
Returns:
Results of the create long (Long) value.
See Also:
getStaticLong(String,long), getLong(String,long)

createLongTable

protected static final java.lang.Long[] createLongTable(int size)
Create long table with the specified size parameter and return the Long[] result.

Parameters:
size - The size (int) parameter.
Returns:
Results of the create long table (Long[]) value.

createNumber

public static java.lang.Number createNumber(long value)
Create number with the specified value parameter and return the Number result.

Parameters:
value - The value (long) parameter.
Returns:
Results of the create number (Number) value.

getCurrentTimestamp

public static java.lang.Object getCurrentTimestamp()
Gets current timestamp.

Returns:
java.lang.Object The timestamp object.

getDefaultLogService

public static org.osgi.service.log.LogService getDefaultLogService()
This should always return a LogService.

Returns:
Results of the get default log service (LogService) value.
See Also:
createDefaultLogService(), setDefaultLogService(LogService)

getDefaultResource

public static java.lang.String getDefaultResource(int resourceId)
Get default resource with the specified resource id parameter and return the String result.

Parameters:
resourceId - The resource ID (int) parameter.
Returns:
Results of the get default resource (String) value.

getLoadLibraryName

public static java.lang.String getLoadLibraryName(java.lang.String baseName)
Get load library name with the specified base name parameter and return the String result.

Parameters:
baseName - The base name (String) parameter.
Returns:
The library name to load with the correct VM version added.

getReadOnlyEmptyCollection

public static final java.util.Collection getReadOnlyEmptyCollection()
Gets the read only empty collection (Collection) value.

Returns:
The read only empty collection (Collection) value.

getReadOnlyEmptyList

public static final java.util.List getReadOnlyEmptyList()
Gets the read only empty list (List) value.

Returns:
The read only empty list (List) value.

getReadOnlyEmptyMap

public static final java.util.Map getReadOnlyEmptyMap()
Gets the read only empty map (Map) value.

Returns:
The read only empty map (Map) value.

getStaticBoolean

public static boolean getStaticBoolean(java.lang.String key,
                                       boolean defaultBoolean)
Get static boolean with the specified key and default boolean parameters and return the boolean result.

Parameters:
key - The key (String) parameter.
defaultBoolean - The default boolean (boolean) parameter.
Returns:
Results of the get static boolean (boolean) value.

getStaticByte

public static byte getStaticByte(java.lang.String key,
                                 byte defaultByte)
Get static byte with the specified key and default byte parameters and return the byte result.

Parameters:
key - The key (String) parameter.
defaultByte - The default byte (byte) parameter.
Returns:
Results of the get static byte (byte) value.
Since:
1.2

getStaticChar

public static char getStaticChar(java.lang.String key,
                                 char defaultChar)
Get static char with the specified key and default char parameters and return the char result.

Parameters:
key - The key (String) parameter.
defaultChar - The default char (char) parameter.
Returns:
Results of the get static char (char) value.
Since:
1.2

getStaticDouble

public static double getStaticDouble(java.lang.String key,
                                     double defaultDouble)
Get static double with the specified key and default double parameters and return the double result.

Parameters:
key - The key (String) parameter.
defaultDouble - The default double (double) parameter.
Returns:
Results of the get static double (double) value.
Since:
1.2

getStaticFloat

public static float getStaticFloat(java.lang.String key,
                                   float defaultFloat)
Get static float with the specified key and default float parameters and return the float result.

Parameters:
key - The key (String) parameter.
defaultFloat - The default float (float) parameter.
Returns:
Results of the get static float (float) value.

getStaticInt

public static int getStaticInt(java.lang.String key,
                               int defaultInt)
Gets the int from the configuration information.

Parameters:
key - The key (String) parameter.
defaultInt - The default int (int) parameter.
Returns:
int The int value.

getStaticLong

public static long getStaticLong(java.lang.String key,
                                 long defaultLong)
Get static long with the specified key and default long parameters and return the long result.

Parameters:
key - The key (String) parameter.
defaultLong - The default long (long) parameter.
Returns:
Results of the get static long (long) value.

getStaticObject

public static java.lang.Object getStaticObject(java.lang.String key,
                                               java.lang.Object defaultObject)
Get static object with the specified key and default object parameters and return the Object result.

Parameters:
key - The key (String) parameter.
defaultObject - The default object (Object) parameter.
Returns:
Results of the get static object (Object) value.

getStaticShort

public static short getStaticShort(java.lang.String key,
                                   short defaultShort)
Get static short with the specified key and default short parameters and return the short result.

Parameters:
key - The key (String) parameter.
defaultShort - The default short (short) parameter.
Returns:
Results of the get static short (short) value.
Since:
1.2

getStaticString

public static java.lang.String getStaticString(java.lang.String key,
                                               java.lang.String defaultString)
Get static string with the specified key and default string parameters and return the String result.

Parameters:
key - The key (String) parameter.
defaultString - The default string (String) parameter.
Returns:
Results of the get static string (String) value.

getTraceLevel

public static int getTraceLevel()
Gets the trace level (int) value.

Returns:
The trace level (int) value.
See Also:
setTraceLevel(int)

getVmLibraryVersion

public static java.lang.String getVmLibraryVersion()
Returns the VM library version.

Returns:
Results of the get VM library version (String) value.

handleStaticError

public static void handleStaticError(java.lang.String string)
Perform the handleStaticException action method.

Parameters:
string - The string (String) parameter.

handleStaticException

public static void handleStaticException(java.lang.Throwable exception)
Perform the handleStaticException action method.

Parameters:
exception - The exception (Throwable) parameter.

isBackward

public static boolean isBackward()
Gets the backward (boolean) value.

Returns:
The backward (boolean) value.
See Also:
setBackward(boolean)

isDebug

public static boolean isDebug()
Gets the Debug state.

Returns:
Results of the is Debug (boolean) value.
See Also:
setDebug(boolean)

isTrace

public static boolean isTrace()
Gets the trace state.

Returns:
Results of the is trace (boolean) value.

isUnmodifiable

public static boolean isUnmodifiable()
Gets the unmodifiable (boolean) value.

Returns:
The unmodifiable (boolean) value.
See Also:
setUnmodifiable(boolean)

loadService

public static java.lang.Object loadService(java.lang.String serviceName,
                                           java.lang.String defaultClassName)
                                    throws java.lang.RuntimeException
Load the specified service name.

Parameters:
serviceName - The service name (String) parameter.
defaultClassName - The default class name (String) parameter.
Returns:
Object The service object.
Throws:
java.lang.RuntimeException - Runtime Exception.
See Also:
createDefaultLogService(), getDefaultLogService(), setDefaultLogService(LogService), getConfigurationService(), getLogService(), setLogService(LogService)

setBackward

public static void setBackward(boolean backward)
Sets the backward value.

Parameters:
backward - The backward (boolean) parameter.
See Also:
isBackward()

setDebug

public static void setDebug(boolean debug)
Sets the debug value.

Parameters:
debug - The debug (boolean) parameter.
See Also:
isDebug()

setDefaultLogService

public static void setDefaultLogService(org.osgi.service.log.LogService defaultLogService)
Sets the default log service value.

Parameters:
defaultLogService - The default log service (LogService) parameter.
See Also:
createDefaultLogService(), getDefaultLogService()

setTraceLevel

public static void setTraceLevel(int traceLevel)
Sets the trace level value.

Parameters:
traceLevel - The trace level (int) parameter.
See Also:
getTraceLevel()

setUnmodifiable

public static void setUnmodifiable(boolean unmodifiable)
Sets the unmodifiable value.

Parameters:
unmodifiable - The unmodifiable (boolean) parameter.
See Also:
isUnmodifiable()

shouldLog

public static boolean shouldLog(int code)
Returns true if the specified code should be logged.

Parameters:
code - The code (int) parameter.
Returns:
boolean If true, then code should be logged.

startupEscStatic

public static java.lang.Long startupEscStatic()
Startup ESC static and return the Long result.

Returns:
Results of the startup ESC static (Long) value.

attemptRecoveryFromError

protected boolean attemptRecoveryFromError(int errorNumber,
                                           java.lang.Throwable error)
Returns true if attempt recovery from error.

Parameters:
errorNumber - The error number (int) parameter.
error - The error (Throwable) parameter.
Returns:
boolean Return true if attempt recovery.

createException

public java.lang.RuntimeException createException(int resourceId)
Create a RuntimeException from the specified resouceId.

Parameters:
resourceId - The resource ID (int) parameter.
Returns:
RuntimeException The created Runtime Exception.
See Also:
handleStaticException(Throwable), createException(int,Object[])

createException

public java.lang.RuntimeException createException(int resourceId,
                                                  java.lang.Object[] objects)
Create a RuntimeException from the specified resouceId.

Parameters:
resourceId - The resource ID (int) parameter.
objects - The objects (Object[]) parameter.
Returns:
RuntimeException The created Runtime Exception.
See Also:
handleStaticException(Throwable), createException(int)

format

public java.lang.String format(int resourceId,
                               java.lang.Object object)
Format the string and return formatted string.

Parameters:
resourceId - The resource ID (int) parameter.
object - The object (Object) parameter.
Returns:
String The formatted string.

getBoolean

public boolean getBoolean(java.lang.String key,
                          boolean defaultBoolean)
Get boolean with the specified key and default boolean parameters and return the boolean result.

Parameters:
key - The key (String) parameter.
defaultBoolean - The default boolean (boolean) parameter.
Returns:
Results of the get boolean (boolean) value.
See Also:
createBoolean(boolean), getStaticBoolean(String,boolean)

getByte

public byte getByte(java.lang.String key,
                    byte defaultByte)
Get byte with the specified key and default byte parameters and return the byte result.

Parameters:
key - The key (String) parameter.
defaultByte - The default byte (byte) parameter.
Returns:
Results of the get byte (byte) value.
Since:
1.2
See Also:
getStaticByte(String,byte)

getChar

public char getChar(java.lang.String key,
                    char defaultChar)
Get char with the specified key and default char parameters and return the char result.

Parameters:
key - The key (String) parameter.
defaultChar - The default char (char) parameter.
Returns:
Results of the get char (char) value.
Since:
1.2
See Also:
getStaticChar(String,char)

getConfigurationService

public ConfigurationService getConfigurationService()
Gets the configuration service value.

Returns:
The configuration service (ConfigurationService) value.

getDouble

public double getDouble(java.lang.String key,
                        double defaultDouble)
Get double with the specified key and default double parameters and return the double result.

Parameters:
key - The key (String) parameter.
defaultDouble - The default double (double) parameter.
Returns:
Results of the get double (double) value.
Since:
1.2
See Also:
getStaticDouble(String,double)

getErrorSeverity

protected int getErrorSeverity(int errorNumber,
                               java.lang.Throwable error)
Return the error severity of the specified error number.

Parameters:
errorNumber - The error number (int) parameter.
error - The error (Throwable) parameter.
Returns:
int The error log severity.
See Also:
LogService

getFloat

public float getFloat(java.lang.String key,
                      float defaultFloat)
Get float with the specified key and default float parameters and return the float result.

Parameters:
key - The key (String) parameter.
defaultFloat - The default float (float) parameter.
Returns:
Results of the get float (float) value.
See Also:
getStaticFloat(String,float)

getId

public java.lang.String getId()
Gets the ID (String) value.

Returns:
The id (String) value.

getIdName

public java.lang.String getIdName()
Gets the ID name (String) value.

Returns:
The id name (String) value.

getInt

public int getInt(java.lang.String key,
                  int defaultInt)
Get int with the specified key and default int parameters and return the int result.

Parameters:
key - The key (String) parameter.
defaultInt - The default int (int) parameter.
Returns:
Results of the get int (int) value.
See Also:
getStaticInt(String,int)

getLogDetails

public java.lang.Object[] getLogDetails(java.lang.Throwable error,
                                        java.lang.Object details,
                                        java.lang.Object details1,
                                        java.lang.Object details2,
                                        java.lang.Object details3)
Get log details with the specified error, details, details1, details2 and details3 parameters and return the Object[] result.

Parameters:
error - The error (Throwable) parameter.
details - The details (Object) parameter.
details1 - The details1 (Object) parameter.
details2 - The details2 (Object) parameter.
details3 - The details3 (Object) parameter.
Returns:
Object[] The log details objects.
See Also:
getLogDetails(Throwable,Object,Object,Object,Object,Object,Object,Object)

getLogDetails

public java.lang.Object[] getLogDetails(java.lang.Throwable error,
                                        java.lang.Object details,
                                        java.lang.Object details1,
                                        java.lang.Object details2,
                                        java.lang.Object details3,
                                        java.lang.Object details4,
                                        java.lang.Object details5,
                                        java.lang.Object details6)
Get log details with the specified error, details, details1, details2 and details3 parameters and return the Object[] result.

Parameters:
error - The error (Throwable) parameter.
details - The details (Object) parameter.
details1 - The details1 (Object) parameter.
details2 - The details2 (Object) parameter.
details3 - The details3 (Object) parameter.
details4 - The details4 (Object) parameter.
details5 - The details5 (Object) parameter.
details6 - The details6 (Object) parameter.
Returns:
Object[] The log details objects.
Since:
1.2
See Also:
getLogDetails(Throwable,Object,Object,Object,Object)

getLogDetails0

public java.lang.Object getLogDetails0()
Get the log details 0. Normally, this is the object reporting.

Returns:
Object The log details 0.

getLogDetails1

public java.lang.Object getLogDetails1()
Get the log details 1. Normally, this is the class of the object reporting.

Returns:
Object The log details 1.

getLogDetails2

public java.lang.Object getLogDetails2()
Get the log details 2. Normally, this is any configuration information of the object reporting.

Returns:
Object The log details 2.

getLogDetails3

public java.lang.Object getLogDetails3()
Get the log details 3. Normally, this is the any system level information.

Returns:
Object The log details 3.

getLogDetails4

public java.lang.Object getLogDetails4()
Get the log details 4. Normally, this is the connection object.

Returns:
Object The log details 4.

getLogDetails5

public java.lang.Object getLogDetails5()
Get the log details 5. Normally, this is the transport object.

Returns:
Object The log details 5.

getLogDetails6

public java.lang.Object getLogDetails6()
Get the log details 6. Normally, this is the device object.

Returns:
Object The log details 6.

getLogDetails7

public java.lang.Object getLogDetails7()
Get the log details 7.

Returns:
Object The log details 7.

getLogLevel

public int getLogLevel()
Gets the log level (int) value.

Returns:
The log level (int) value.

getLogService

public org.osgi.service.log.LogService getLogService()
This should always return a valid LogService.

Returns:
Results of the get log service (LogService) value.
See Also:
createDefaultLogService(), getDefaultLogService(), setDefaultLogService(LogService), setLogService(LogService)

getLong

public long getLong(java.lang.String key,
                    long defaultLong)
Get long with the specified key and get long parameters and return the long result.

Parameters:
key - The key (String) parameter.
defaultLong - The default long (long) parameter.
Returns:
Results of the get long (long) value.
See Also:
createLong(long), getStaticLong(String,long)

getObject

public java.lang.Object getObject(java.lang.String key,
                                  java.lang.Object defaultObject)
Get object with the specified key and default object parameters and return the Object result.

Parameters:
key - The key (String) parameter.
defaultObject - The default object (Object) parameter.
Returns:
Results of the get object (Object) value.
See Also:
EscObject(), getStaticObject(String,Object)

getOutputName

public java.lang.String getOutputName()
Gets the output name (String) value.

Returns:
The output name (String) value.

getResource

public java.lang.String getResource(int resourceId)
Return the string resource.

Parameters:
resourceId - The resource ID (int) parameter.
Returns:
String The string resource.
See Also:
getDefaultResource(int)

getShort

public short getShort(java.lang.String key,
                      short defaultShort)
Get short with the specified key and default short parameters and return the short result.

Parameters:
key - The key (String) parameter.
defaultShort - The default short (short) parameter.
Returns:
Results of the get short (short) value.
Since:
1.2
See Also:
getStaticShort(String,short)

getSimpleClassName

public java.lang.String getSimpleClassName()
Gets the simple class name (String) value.

Returns:
The simple class name (String) value.

getString

public java.lang.String getString(java.lang.String key,
                                  java.lang.String defaultString)
Get string with the specified key and default string parameters and return the String result.

Parameters:
key - The key (String) parameter.
defaultString - The default string (String) parameter.
Returns:
Results of the get string (String) value.
See Also:
getStaticString(String,String), toString()

handleError

public void handleError(java.lang.Throwable error,
                        int resourceId)
Handle error with the specified error and resource ID parameters.

Parameters:
error - The error (Throwable) parameter.
resourceId - The resource ID (int) parameter.
See Also:
handleStaticError(String), attemptRecoveryFromError(int,Throwable), handleError(Throwable,int,Object), handleError(Throwable,int,Object,Object), handleError(Throwable,int,Object[]), reportError(int,Throwable,Object[])

handleError

public void handleError(java.lang.Throwable error,
                        int resourceId,
                        java.lang.Object details)
Handle error with the specified error, resource id and details parameters.

Parameters:
error - The error (Throwable) parameter.
resourceId - The resource ID (int) parameter.
details - The details (Object) parameter.
See Also:
handleStaticError(String), attemptRecoveryFromError(int,Throwable), handleError(Throwable,int), handleError(Throwable,int,Object,Object), handleError(Throwable,int,Object[]), reportError(int,Throwable,Object[])

handleError

public void handleError(java.lang.Throwable error,
                        int resourceId,
                        java.lang.Object details,
                        java.lang.Object details2)
Handle error with the specified error, resource id, details and details2 parameters.

Parameters:
error - The error (Throwable) parameter.
resourceId - The resource ID (int) parameter.
details - The details (Object) parameter.
details2 - The details2 (Object) parameter.
See Also:
handleStaticError(String), attemptRecoveryFromError(int,Throwable), handleError(Throwable,int), handleError(Throwable,int,Object), handleError(Throwable,int,Object[]), reportError(int,Throwable,Object[])

handleError

protected void handleError(java.lang.Throwable error,
                           int resourceId,
                           java.lang.Object[] details)
Handle error with the specified error, resource id and details parameters.

Parameters:
error - The error (Throwable) parameter.
resourceId - The resource ID (int) parameter.
details - The details (Object[]) parameter.
See Also:
handleStaticError(String), attemptRecoveryFromError(int,Throwable), handleError(Throwable,int), handleError(Throwable,int,Object), handleError(Throwable,int,Object,Object), reportError(int,Throwable,Object[])

handleErrorInternal

protected void handleErrorInternal(java.lang.Throwable error,
                                   int resourceId,
                                   java.lang.Object[] objects)
Perform the handleError action method. This method should be called when an unexpected, system-critical exception occurs.

Parameters:
error - The error (Throwable) parameter.
resourceId - The resource ID (int) parameter.
objects - The objects (Object[]) parameter.

isLogging

public boolean isLogging(int severity)
Is logging with the specified severity parameter and return the boolean result.

Parameters:
severity - The severity (int) parameter.
Returns:
Results of the is logging (boolean) value.

log

public void log(int severity,
                java.lang.String message)
Log the event.

Parameters:
severity - The severity (int) parameter.
message - The message (String) parameter.
See Also:
log(int,String,Throwable), log(Throwable,int)

log

public void log(int severity,
                java.lang.String message,
                java.lang.Throwable exception)
Log the event.

Parameters:
severity - The severity (int) parameter.
message - The message (String) parameter.
exception - The exception (Throwable) parameter.
See Also:
log(int,String), log(Throwable,int)

log

public void log(java.lang.Throwable error,
                int resourceId)
Log with the specified error and resource id parameters.

Parameters:
error - The error (Throwable) parameter.
resourceId - The resource ID (int) parameter.
See Also:
log(int,String), log(int,String,Throwable)

report

public void report(int reportNumber,
                   java.lang.Object[] errorObjects)
Report with the specified report number and error objects parameters.

Parameters:
reportNumber - The report number (int) parameter.
errorObjects - The error objects (Object[]) parameter.
See Also:
report(Throwable,int), report(Throwable,int,Object), report(Throwable,int,Object,Object), report(Throwable,int,Object,Object,Object), report(Throwable,int,Object,Object,Object,Object), report(Throwable,int,Object,Object,Object,Object,Object)

report

public void report(java.lang.Throwable error,
                   int resourceId)
Report with the specified error and resource id parameters.

Parameters:
error - The error (Throwable) parameter.
resourceId - The resource ID (int) parameter.
See Also:
report(int,Object[]), report(Throwable,int,Object), report(Throwable,int,Object,Object), report(Throwable,int,Object,Object,Object), report(Throwable,int,Object,Object,Object,Object), report(Throwable,int,Object,Object,Object,Object,Object)

report

public void report(java.lang.Throwable error,
                   int resourceId,
                   java.lang.Object details)
Report with the specified error, resource id and details parameters.

Parameters:
error - The error (Throwable) parameter.
resourceId - The resource ID (int) parameter.
details - The details (Object) parameter.
See Also:
report(int,Object[]), report(Throwable,int), report(Throwable,int,Object,Object), report(Throwable,int,Object,Object,Object), report(Throwable,int,Object,Object,Object,Object), report(Throwable,int,Object,Object,Object,Object,Object)

report

public void report(java.lang.Throwable error,
                   int resourceId,
                   java.lang.Object details,
                   java.lang.Object details1)
Report with the specified error, resource id, details and details1 parameters.

Parameters:
error - The error (Throwable) parameter.
resourceId - The resource ID (int) parameter.
details - The details (Object) parameter.
details1 - The details1 (Object) parameter.
See Also:
report(int,Object[]), report(Throwable,int), report(Throwable,int,Object), report(Throwable,int,Object,Object,Object), report(Throwable,int,Object,Object,Object,Object), report(Throwable,int,Object,Object,Object,Object,Object)

report

public void report(java.lang.Throwable error,
                   int resourceId,
                   java.lang.Object details,
                   java.lang.Object details1,
                   java.lang.Object details2)
Report with the specified error, resource id, details, details1 and details2 parameters.

Parameters:
error - The error (Throwable) parameter.
resourceId - The resource ID (int) parameter.
details - The details (Object) parameter.
details1 - The details1 (Object) parameter.
details2 - The details2 (Object) parameter.
See Also:
report(int,Object[]), report(Throwable,int), report(Throwable,int,Object), report(Throwable,int,Object,Object), report(Throwable,int,Object,Object,Object,Object), report(Throwable,int,Object,Object,Object,Object,Object)

report

public void report(java.lang.Throwable error,
                   int resourceId,
                   java.lang.Object details,
                   java.lang.Object details1,
                   java.lang.Object details2,
                   java.lang.Object details3)
Report with the specified error, resource id, details, details1, details2 and details3 parameters.

Parameters:
error - The error (Throwable) parameter.
resourceId - The resource ID (int) parameter.
details - The details (Object) parameter.
details1 - The details1 (Object) parameter.
details2 - The details2 (Object) parameter.
details3 - The details3 (Object) parameter.
See Also:
report(int,Object[]), report(Throwable,int), report(Throwable,int,Object), report(Throwable,int,Object,Object), report(Throwable,int,Object,Object,Object), report(Throwable,int,Object,Object,Object,Object,Object)

report

public void report(java.lang.Throwable error,
                   int resourceId,
                   java.lang.Object details,
                   java.lang.Object details1,
                   java.lang.Object details2,
                   java.lang.Object details3,
                   java.lang.Object details4)
Report with the specified error, resource id, details, details1, details2 and details3 parameters.

Parameters:
error - The error (Throwable) parameter.
resourceId - The resource ID (int) parameter.
details - The details (Object) parameter.
details1 - The details1 (Object) parameter.
details2 - The details2 (Object) parameter.
details3 - The details3 (Object) parameter.
details4 - The details4 (Object) parameter.
Since:
1.2
See Also:
report(int,Object[]), report(Throwable,int), report(Throwable,int,Object), report(Throwable,int,Object,Object), report(Throwable,int,Object,Object,Object), report(Throwable,int,Object,Object,Object,Object)

reportError

protected void reportError(int errorNumber,
                           java.lang.Throwable error,
                           java.lang.Object[] errorObjects)
                    throws java.lang.RuntimeException
Report error with the specified error number, error and error objects parameters.

Parameters:
errorNumber - The error number (int) parameter.
error - The error (Throwable) parameter.
errorObjects - The error objects (Object[]) parameter.
Throws:
java.lang.RuntimeException - Runtime Exception.
See Also:
handleStaticError(String), attemptRecoveryFromError(int,Throwable), handleError(Throwable,int), handleError(Throwable,int,Object), handleError(Throwable,int,Object,Object), handleError(Throwable,int,Object[])

reportSystemInfo

public void reportSystemInfo()
Report system info.


setLogService

public void setLogService(org.osgi.service.log.LogService logService)
Set the LogService.

Parameters:
logService - The log service (LogService) parameter.
See Also:
createDefaultLogService(), getDefaultLogService(), setDefaultLogService(LogService), getLogService()

sleep

public void sleep(long milliseconds)
Sleep the specified number of milliseconds. This method should be called to perform a sleep. It standardizes the exception handling, and removes clutter from the user code.

Parameters:
milliseconds - The milliseconds (long) parameter.

toString

public java.lang.String toString()
Returns the string value.

Overrides:
toString in class java.lang.Object
Returns:
The string (String) value.
See Also:
getStaticString(String,String), getString(String,String)

toStringConfigurationKeys

public java.lang.String[] toStringConfigurationKeys()
Returns the string configuration keys (String[]) value.

Returns:
The string configuration keys (String[]) value.

toStringInfo

public void toStringInfo(java.lang.StringBuffer buffer)
To string info with the specified buffer parameter.

Parameters:
buffer - The buffer (StringBuffer) parameter.

2009-01-09 1.2.0

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