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
           
 
Constructor Summary
ECTracingProvider()
           
 
Method Summary
 void disable()
          This method is used to disable Tracing.
 void disable(long componentId)
          This method is called to disable a specific tracing component
 void disableTracing()
          This method is used to disable Tracing.
 void enable()
          This method is used to enable Tracing.
 void enable(long componentId)
          This method is called to enable a specific tracing component
 void enableTracing()
          This method is used to enable Tracing.
 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()
          This method is used to close the file output for cleanup.
static long getComponent(java.lang.Object comp)
          This method is called to get the component id
static java.lang.String getComponentName(long componentId)
          This method is called to get the component name
 int getSizeOfComponent()
          This method returns the number of tracing components.
static ECTracingProvider getUniqueInstance()
          This method is called to return an unique instance of ECTracingProvider.
 boolean isClientInfoEnabled()
          This method is used to check if Client Tracing information is enabled.
 boolean isTraceable(long componentId)
          This method is used to check if a particular component is tracable.
 boolean isTraceEnabled()
          This method is used to check if Tracing is enabled.
 void overrideMask(int[] componentMask)
          This method updates the status of the tracing components.
 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

COPYRIGHT

public static final java.lang.String COPYRIGHT
Constructor Detail

ECTracingProvider

public ECTracingProvider()
Method Detail

disable

public void disable()
This method is used to disable Tracing.

disable

public void disable(long componentId)
This method is called to disable a specific tracing component
Specified by:
disable in interface ITracingService
Parameters:
component - long

disableTracing

public void disableTracing()
This method is used to disable Tracing.
Specified by:
disableTracing in interface ITracingService

enable

public void enable()
This method is used to enable Tracing.

enable

public void enable(long componentId)
This method is called to enable a specific tracing component
Specified by:
enable in interface ITracingService
Parameters:
component - long

enableTracing

public void enableTracing()
This method is used to enable Tracing.
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 - long
class - name String
method - name String

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
Parameters:
componentId - long
class - name String
method - name String

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 - long
class - name String
method - name String
return - object value Object

finalize

protected void finalize()
This method is used to close the file output for cleanup.
Overrides:
finalize in class java.lang.Object

getComponent

public static long getComponent(java.lang.Object comp)
This method is called to get the component id
Parameters:
component - Object

getComponentName

public static java.lang.String getComponentName(long componentId)
This method is called to get the component name
Parameters:
componentId - long

getSizeOfComponent

public int getSizeOfComponent()
This method returns the number of tracing components.

getUniqueInstance

public static ECTracingProvider getUniqueInstance()
This method is called to return an unique instance of ECTracingProvider.

isClientInfoEnabled

public boolean isClientInfoEnabled()
This method is used to check if Client Tracing information is enabled.
Specified by:
isClientInfoEnabled in interface ITracingService

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 - long

isTraceEnabled

public boolean isTraceEnabled()
This method is used to check if Tracing is enabled.
Specified by:
isTraceEnabled in interface ITracingService

overrideMask

public void overrideMask(int[] componentMask)
This method 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:
componentName - The name of the component to which the class to be traced belongs.
classname - The name of the class to be traced.
methodName - The name of the method to be traced.
text - The text to be recorded.