Enterprise Information Portal APIs

com.ibm.mm.beans
Class CMBTraceSupport

java.lang.Object
  |
  +--com.ibm.mm.beans.CMBTraceSupport
All Implemented Interfaces:
java.io.Serializable

public class CMBTraceSupport
extends java.lang.Object
implements java.io.Serializable

This is a utility class that can be used by beans that broadcast CMBTraceEvents.

Since:
6.1
See Also:
CMBTraceListener, CMBTraceEvent, com.ibm.mm.beans.CMBTraceLog, Serialized Form

Field Summary
static java.lang.String LINE_SEPARATOR
           
static java.lang.String SEPARATOR
           
 
Constructor Summary
CMBTraceSupport()
          Constructor.
CMBTraceSupport(java.lang.Object source)
          Constructor.
 
Method Summary
 void addCMBTraceListener(CMBTraceListener listener)
          CMBTraceEvent registration method.
 void fireCMBTrace(CMBTraceEvent event)
          CMBTraceEvent notification method.
 void fireCMBTrace(int id, java.lang.String message)
          CMBTraceEvent notification method.
 void fireCMBTrace(java.lang.String message)
          CMBTraceEvent notification method.
 void fireCMBTrace(java.lang.Throwable exception)
          CMBTraceEvent notification method.
 void fireCMBTraceDebug(java.lang.String methodName, java.lang.String message)
          CMBTraceEvent notification method.A CMB_TRACE_DEBUG type of trace.
 void fireCMBTraceEnter(java.lang.String methodName)
          CMBTraceEvent notification method.
 void fireCMBTraceExit(java.lang.String methodName)
          CMBTraceEvent notification method.
 void fireCMBTraceExitAbnormal(java.lang.String methodName, java.lang.String message)
          CMBTraceEvent notification method.
static boolean isForceTraceEnabled()
          Checks if force trace is enabled
 void removeCMBTraceListener(CMBTraceListener listener)
          CMBTraceEvent unregistration method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINE_SEPARATOR

public static final java.lang.String LINE_SEPARATOR

SEPARATOR

public static final java.lang.String SEPARATOR
Constructor Detail

CMBTraceSupport

public CMBTraceSupport()
Constructor. This constructor can be used by non-serializable source. The event notificiation method used by that source then should be the one with an CMBTraceEvent arguement.

CMBTraceSupport

public CMBTraceSupport(java.lang.Object source)
Constructor.
Parameters:
source - the bean or object to be given as the source for CMBTraceEvent
Method Detail

addCMBTraceListener

public void addCMBTraceListener(CMBTraceListener listener)
CMBTraceEvent registration method. It ignores a registration request if the listener is already registered.
Parameters:
listener - listener to be registered

removeCMBTraceListener

public void removeCMBTraceListener(CMBTraceListener listener)
CMBTraceEvent unregistration method.
Parameters:
listener - listener to be unregistered

fireCMBTrace

public void fireCMBTrace(CMBTraceEvent event)
CMBTraceEvent notification method. This method can be used by non-serializable source which uses this class zero arguement constructor. The event firing order is based on the order of registration.
Parameters:
event - the trace event to post

fireCMBTrace

public void fireCMBTrace(int id,
                         java.lang.String message)
CMBTraceEvent notification method. The event firing order is based on the order of registration.
Parameters:
id - the event type - CMB_TRACE_PROGRESS, CMB_TRACE_DEBUG or CMB_TRACE_ERROR
message - the trace message

fireCMBTrace

public void fireCMBTrace(java.lang.String message)
CMBTraceEvent notification method. A CMB_TRACE_PROGRESS type of trace. The event firing order is based on the order of registration.
Parameters:
message - the function progress message

fireCMBTrace

public void fireCMBTrace(java.lang.Throwable exception)
CMBTraceEvent notification method. A CMB_TRACE_ERROR type of trace. The event firing order is based on the order of registration.
Parameters:
exception - the exception object

fireCMBTraceDebug

public void fireCMBTraceDebug(java.lang.String methodName,
                              java.lang.String message)
CMBTraceEvent notification method.A CMB_TRACE_DEBUG type of trace. The event firing order is based on the order of registration.
Parameters:
methodName - the name of the method that is debugged
message - the trace message

fireCMBTraceEnter

public void fireCMBTraceEnter(java.lang.String methodName)
CMBTraceEvent notification method. A CMB_TRACE_PROGRESS type of trace. The event firing order is based on the order of registration.
Parameters:
methodName - the name of the method that was entered

fireCMBTraceExit

public void fireCMBTraceExit(java.lang.String methodName)
CMBTraceEvent notification method. A CMB_TRACE_PROGRESS type of trace. The event firing order is based on the order of registration.
Parameters:
methodName - the name of the method that was exited

fireCMBTraceExitAbnormal

public void fireCMBTraceExitAbnormal(java.lang.String methodName,
                                     java.lang.String message)
CMBTraceEvent notification method. A CMB_TRACE_PROGRESS type of trace. The event firing order is based on the order of registration.
Parameters:
methodName - the name of the method that was exited abnormaly

isForceTraceEnabled

public static boolean isForceTraceEnabled()
Checks if force trace is enabled

EIP JavaBeans

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.