1.0.0

org.eclipse.soda.dk.core
Class EscObject

java.lang.Object
  extended by org.eclipse.soda.dk.core.EscObject
Direct Known Subclasses:
CommandListeners, ConfigurableObject, Connection, Control, DeviceListeners, MeasurementListeners, MessageListeners, NotificationClient, NotificationTest, Parameter, SignalListeners, Transform, Transport, TransportListeners, TransportTest

public abstract class EscObject
extends java.lang.Object

Version:
1.0.0

Field Summary
static int CLONE_EXCEPTION_RESOURCE
          Define the clone exception resouce 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.Integer[] INTEGER_TABLE
          Define the integer table (Integer[]) 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_ERROR
          Define the log error (int) constant.
static int LOG_INFO
          Define the log info (int) constant.
static int LOG_TRACE
          Define the log trace (int) constant.
static int LOG_WARNING
          Define the log warning (int) constant.
static java.lang.String PREFIX_KEY
          Define the prefix key (String) 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 min (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 tracelevel key (String) constant.
static int UNKNOWN_ERROR_RESOURCE
          Define the unknow error resource ID.
 
Constructor Summary
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 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()
          Create integer table and return the Integer[] 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.
 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.
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.
 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)
          Gets the load library name with the correct vm version number.
 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 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.
 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.
 java.lang.String getResource(int resourceId)
          Return the string resource.
 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 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 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)
           
 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[] 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 isDebug()
          Gets the Debug state.
static boolean isTrace()
          Gets the trace state.
static java.lang.Object loadService(java.lang.String serviceName, java.lang.String defaultClassName)
          Load the specifed 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 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.
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 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 boolean shouldLog(int code)
          Returns true if the specified code should be logged.
 void sleep(long milliseconds)
          Sleep the specified number of millisonds.
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_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

TO_STRING_CONFIGURATION_KEYS

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


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 min (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 tracelevel 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

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


UNKNOWN_ERROR_RESOURCE

public static final int UNKNOWN_ERROR_RESOURCE
Define the unknow 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 resouce 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
Constructor Detail

EscObject

public EscObject()
Constructs an instance of this class.

Method Detail

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()
Create integer table and return the Integer[] result.

Returns:
Results of the create integer table (Integer[]) 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)
Gets the load library name with the correct vm version number.

Parameters:
baseName - The base name of the library without the vm version nmber.
Returns:
The library name to load with the correct vm version added.

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.

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 specified key.
defaultInt - The default value if the key is not found.
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.

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 - java.lang.Throwable

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.

loadService

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

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

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 new default log service value (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()

shouldLog

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

Parameters:
code - The specified code to be checked.
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.
error - The Throwable error or null.
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 resouce ID of the string.
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 resouce ID of the string.
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 of the string.
object - The paramter to use to format the string.
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:
getStaticBoolean(String,boolean)

getConfigurationService

public ConfigurationService getConfigurationService()
Gets the configuration service value.

Returns:
The configuration service (ConfigurationService) value.

getErrorSeverity

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

Parameters:
errorNumber - The error number.
error - The Throwable error or null.
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)

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)
Parameters:
error - Any throwable object to log.
details - Any details with this log details.
details1 - The details1 (Object) parameter.
details2 - The details2 (Object) parameter.
details3 - The details3 (Object) parameter.
Returns:
Object[] The log details objects.

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.

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:
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 to get.
Returns:
String The string resource.
See Also:
getDefaultResource(int)

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)
Parameters:
error - The Throwable error object or null.
resourceId - The resourceId of the error.
See Also:
handleStaticError(String), attemptRecoveryFromError(int,Throwable), handleError(Throwable,int,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[]), reportError(int,Throwable,Object[])

handleError

protected void handleError(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 - java.lang.Throwable
resourceId - The resource id (int) parameter.
objects - The objects (Object[]) parameter.
See Also:
handleStaticError(String), attemptRecoveryFromError(int,Throwable), handleError(Throwable,int), handleError(Throwable,int,Object), reportError(int,Throwable,Object[])

log

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

Parameters:
severity - an int defining the severity of the event (should be one of LOG_ERROR, LOG_WARNING, LOG_INFO, or LOG_DEBUG)
message - a java.lang.String containing a readable description of the log entry
See Also:
log(int,String,Throwable)

log

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

Parameters:
severity - an int defining the severity of the event (should be one of LOG_ERROR, LOG_WARNING, LOG_INFO, or LOG_DEBUG)
message - a java.lang.String containing a readable description of the log entry
exception - the java.lang.Throwable which led to the log entry, may be null
See Also:
log(int,String)

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(Throwable,int,Object), report(Throwable,int,Object,Object), report(Throwable,int,Object,Object,Object), report(Throwable,int,Object,Object,Object,Object), report(int,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(Throwable,int), report(Throwable,int,Object,Object), report(Throwable,int,Object,Object,Object), report(Throwable,int,Object,Object,Object,Object), report(int,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(Throwable,int), report(Throwable,int,Object), report(Throwable,int,Object,Object,Object), report(Throwable,int,Object,Object,Object,Object), report(int,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(Throwable,int), report(Throwable,int,Object), report(Throwable,int,Object,Object), report(Throwable,int,Object,Object,Object,Object), report(int,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(Throwable,int), report(Throwable,int,Object), report(Throwable,int,Object,Object), report(Throwable,int,Object,Object,Object), report(int,Object[])

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)

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[])

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 millisonds. 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) to sleep.

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.

1.0.0

Copyright (c) 1999, 2007 IBM