com.ibm.commerce.ras
Class ECTracingProvider

java.lang.Object
  |
  +--com.ibm.commerce.ras.ECTracingProvider
All Implemented Interfaces:
ITracingService

public final class ECTracingProvider
extends java.lang.Object
implements ITracingService

ECTracingProvider is used to configure tracing and write the tracing information to output.


Field Summary
static java.lang.String COPYRIGHT
          IBM copyright notice field.
 
Constructor Summary
ECTracingProvider()
           
 
Method Summary
 void disable()
          Disables tracing subsystem.
 void disable(long componentId)
          Disables a specific tracing component.
 void disableTracing()
          Disables tracing subsystem.
 void enable()
          Enables tracing subsystem.
 void enable(long componentId)
          Enables a specific tracing component.
 void enableTracing()
          Enables tracing subsystem.
 void entry(long componentId, java.lang.String className, java.lang.String methodName)
          Writes an entry in the trace file to record the entry from a method.
 void exit(long componentId, java.lang.String className, java.lang.String methodName)
          Writes an entry in the trace file to record the exit from a method
 void exit(long componentId, java.lang.String className, java.lang.String methodName, java.lang.Object retValue)
          Writes an entry in the trace file to record the exit from a method
protected  void finalize()
          Closes the file output for cleanup.
static long getComponent(java.lang.Object comp)
          Gets the component id
static java.lang.String getComponentName(long componentId)
          Gets the component name.
 int getSizeOfComponent()
          Returns the number of tracing components.
static  ECTracingProvider getUniqueInstance()
          Gets an unique instance of ECTracingProvider.
 boolean isClientInfoEnabled()
          Checks if client tracing information is enabled.
 boolean isTraceable(long componentId)
          This method is used to check if a particular component is tracable.
 boolean isTraceEnabled()
          Checks if tracing is enabled.
 void overrideMask(int[] componentMask)
          Updates the status of the tracing components.
 void setClientInfoEnabled(boolean value)
          Sets the Client Tracing information option.
 void trace(long componentId, java.lang.String className, java.lang.String methodName, java.lang.String text)
          Writes an entry in the trace file to record a trace point in a method.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM copyright notice field.
See Also:
Constant Field Values
Constructor Detail

ECTracingProvider

public ECTracingProvider()
Method Detail

disable

public void disable()
Disables tracing subsystem.

disable

public void disable(long componentId)
Disables a specific tracing component.
Specified by:
disable in interface ITracingService

disableTracing

public void disableTracing()
Disables tracing subsystem.
Specified by:
disableTracing in interface ITracingService

enable

public void enable()
Enables tracing subsystem.

enable

public void enable(long componentId)
Enables a specific tracing component.
Specified by:
enable in interface ITracingService

enableTracing

public void enableTracing()
Enables tracing subsystem.
Specified by:
enableTracing in interface ITracingService

entry

public void entry(long componentId,
                  java.lang.String className,
                  java.lang.String methodName)
Writes an entry in the trace file to record the entry from a method.
Specified by:
entry in interface ITracingService
Parameters:
componentId - tracing component
className - class name
methodName - method name

exit

public void exit(long componentId,
                 java.lang.String className,
                 java.lang.String methodName)
Writes an entry in the trace file to record the exit from a method
Specified by:
exit in interface ITracingService
Parameters:
componentId - tracing component
className - class name
methodName - method name

exit

public void exit(long componentId,
                 java.lang.String className,
                 java.lang.String methodName,
                 java.lang.Object retValue)
Writes an entry in the trace file to record the exit from a method
Specified by:
exit in interface ITracingService
Parameters:
componentId - tracing component
className - class name
methodName - method name
retValue - return object value

finalize

protected void finalize()
Closes the file output for cleanup.
Overrides:
finalize in class java.lang.Object

getComponent

public static long getComponent(java.lang.Object comp)
Gets the component id
Parameters:
comp - component Object

getComponentName

public static java.lang.String getComponentName(long componentId)
Gets the component name.
Parameters:
componentId - tracing component Id

getSizeOfComponent

public int getSizeOfComponent()
Returns the number of tracing components.
Returns:
number of tracing components

getUniqueInstance

public static ECTracingProvider getUniqueInstance()
Gets an unique instance of ECTracingProvider.
Returns:
unique instance of ECTracingProvider

isClientInfoEnabled

public boolean isClientInfoEnabled()
Checks if client tracing information is enabled.
Specified by:
isClientInfoEnabled in interface ITracingService
Returns:
true if client tracing information is enabled; false otherwise

isTraceable

public boolean isTraceable(long componentId)
This method is used to check if a particular component is tracable.
Specified by:
isTraceable in interface ITracingService
Parameters:
componentId - tracing component Id
Returns:
true if the tracing component is traceable; false otherwise

isTraceEnabled

public boolean isTraceEnabled()
Checks if tracing is enabled.
Specified by:
isTraceEnabled in interface ITracingService
Returns:
true if tracing subsystem is enabled

overrideMask

public void overrideMask(int[] componentMask)
Updates the status of the tracing components.

trace

public void trace(long componentId,
                  java.lang.String className,
                  java.lang.String methodName,
                  java.lang.String text)
Writes an entry in the trace file to record a trace point in a method.
Specified by:
trace in interface ITracingService
Parameters:
methodName - the name of the method to be traced
text - the text to be recorded
componentId - The name of the component to which the class to be traced belongs

setClientInfoEnabled

public void setClientInfoEnabled(boolean value)
Sets the Client Tracing information option.
Specified by:
setClientInfoEnabled in interface ITracingService
Parameters:
value - client tracing information enablement value