com.ibm.ras
Class RASTraceEvent
- java.lang.Object
com.ibm.ras.RASEvent
com.ibm.ras.RASTraceEvent
Deprecated. As of WAS 6.0, recommend using java.util.logging
- public class RASTraceEvent
- extends RASEvent
- implements RASITraceEvent
RASTraceEvent encapsulates all of the information generated by
RASTraceLogger. It is not necessary to create a
RASTraceEvent directly, as the RASTraceLogger
handles this task. However, the methods of this class are public, should
it be necessary to extend RASTraceEvent.
A RASTraceEvent object contains the following components:
- A flag which identifies this event as a trace event.
- A time stamp, generated when the
RASTraceEventis created. - A trace type.
- The trace event text, which conveys some useful information
to the developer. Since tracing is only intended for the software development
team, no provision is made for translating
RASTraceEventtext. - A set of
Stringswhich can be displayed with the trace event text. These parameters are required only if the text expects them. - A set of additional attributes that may be part of the event data.
The following attributes may be set. Unless otherwise noted, all
Objectsassociated with the attributes areStrings.- loggingClass
- The name of the Java class which generated the trace event.
- loggingMethod
- The name of the Java method which generated the trace event.
- threadID
- The thread identifier.
- logger
- The name of the
RASTraceLoggerwhich created the trace event. - server
- A server associated with the creation of the trace event.
- client
- The client on whose behalf the trace event was created.
- exception
- A
Throwableobject.
Constants for these attributes are defined in
RASConstants.
The RASTraceEvent type is defined by the set of
RASITraceEvent TYPE_XXXX constants.
Values 0x000000 up to, but not including, 0x100000L are reserved.
Extensions to the RASTraceEvent
class may use values outside this range for additional types.
The constant
RASITraceEvent.DEFAULT_TRACE_MASK
contains the set of RASTraceEvent types that the handlers
will log by default. The default mask is defined as follows:
public static final long DEFAULT_TRACE_MASK = TYPE_API | TYPE_CALLBACK | TYPE_ENTRY_EXIT | TYPE_ERROR_EXC | TYPE_MISC_DATA | TYPE_OBJ_CREATE | TYPE_OBJ_DELETE | TYPE_PRIVATE | TYPE_PUBLIC | TYPE_STATIC | TYPE_SVC;
Field Summary
| Fields inherited from interface com.ibm.ras.RASITraceEvent |
|---|
ALL_TRACE_MASK, DEFAULT_TRACE_MASK, TYPE_API, TYPE_CALLBACK, TYPE_ENTRY_EXIT, TYPE_ERROR_EXC, TYPE_LEVEL1, TYPE_LEVEL2, TYPE_LEVEL3, TYPE_MISC_DATA, TYPE_OBJ_CREATE, TYPE_OBJ_DELETE, TYPE_PERF, TYPE_PRIVATE, TYPE_PUBLIC, TYPE_STATIC, TYPE_SVC |
Constructor Summary
| Modifier | Constructor and Description |
|---|---|
|
RASTraceEvent()
Deprecated. Creates a
RASTraceEvent object.
|
|
RASTraceEvent(long type,java.lang.String text,java.lang.Object[] parms)
Deprecated. Creates a
RASTraceEvent object.
|
|
RASTraceEvent(long type,java.lang.String text,java.lang.Object[] parms,java.lang.String loggingClass,java.lang.String loggingMethod,RASITraceLogger logger,java.lang.String server,java.lang.String client,java.lang.Throwable exception)
Deprecated. Creates a
RASTraceEvent object.
|
|
RASTraceEvent(long type,java.lang.String text,java.lang.String[] parms)
Deprecated. Use
RASTraceEvent
instead.
|
|
RASTraceEvent(long type,java.lang.String text,java.lang.String[] parms,java.lang.String loggingClass,java.lang.String loggingMethod,RASITraceLogger logger,java.lang.String server,java.lang.String client,java.lang.Throwable exception)
Deprecated. Use
RASTraceEvent instead.
|
|
RASTraceEvent(long type,java.lang.String loggingClass,java.lang.String loggingMethod,RASITraceLogger logger,java.lang.String server,java.lang.String client,byte[] data)
Deprecated. Creates a
RASTraceEvent object.
|
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
getSupportedTypes()
Deprecated. Gets the complete set of trace event types supported by this class.
|
|
maskLongValue(java.lang.String types)
Deprecated. Converts a
String representation of a trace
mask to its long equivalent.
|
|
maskToString(long types)
Deprecated. Converts a long containing the logical OR of one or more event types
to its
String equivalent.
|
|
toString()
Deprecated. Returns a
String representation of this object.
|
| Methods inherited from class com.ibm.ras.RASEvent |
|---|
getAttribute, getParameters, getText, getTimeStamp, getType, isMessageEvent, objectsToStrings, setAttribute, setMessageEvent, setParameters, setText, setTimeStamp, setType |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail
RASTraceEvent
- public RASTraceEvent()
RASTraceEvent
- protected RASTraceEvent(long type,
- java.lang.String text,
- java.lang.Object[] parms)
RASTraceEvent object.
type - The type of trace event. text - The trace text. parms - An array of Objects to be displayed
with the trace text. RASTraceEvent
- protected RASTraceEvent(long type,
- java.lang.String text,
- java.lang.String[] parms)
RASTraceEvent
instead.
RASTraceEvent object.
type - The type of trace event. text - The trace text. parms - An array of Strings to be displayed
with the trace text. RASTraceEvent
- public RASTraceEvent(long type,
- java.lang.String text,
- java.lang.Object[] parms,
- java.lang.String loggingClass,
- java.lang.String loggingMethod,
- RASITraceLogger logger,
- java.lang.String server,
- java.lang.String client,
- java.lang.Throwable exception)
RASTraceEvent object.
type - The type of trace event. text - The trace text. parms - An array of Objects to be displayed
with the trace text. loggingClass - The class. loggingMethod - The method. server - The server. client - The client. exception - A Throwable object. RASTraceEvent
- public RASTraceEvent(long type,
- java.lang.String text,
- java.lang.String[] parms,
- java.lang.String loggingClass,
- java.lang.String loggingMethod,
- RASITraceLogger logger,
- java.lang.String server,
- java.lang.String client,
- java.lang.Throwable exception)
RASTraceEvent instead.
RASTraceEvent object.
type - The type of trace event. text - The trace text. parms - An array of Strings to be displayed
with the trace text. loggingClass - The class. loggingMethod - The method. server - The server. client - The client. exception - A Throwable object. RASTraceEvent
- public RASTraceEvent(long type,
- java.lang.String loggingClass,
- java.lang.String loggingMethod,
- RASITraceLogger logger,
- java.lang.String server,
- java.lang.String client,
- byte[] data)
RASTraceEvent object.
type - The type of trace event. loggingClass - The class. loggingMethod - The method. server - The server. client - The client. data - An array of bytes. Method Detail
getSupportedTypes
- public java.util.Hashtable getSupportedTypes( )
This method can be used by a graphical log manager to display the
set of types and allow a user to select those to be monitored. Every
extending class should override this method to add the types it supports
to the Hashtable returned by its parent.
getSupportedTypes in interface RASIEvent
getSupportedTypes in class RASEvent
Hashtable containing the values of all of the
trace event types. The names of the types are used as keys and
are returned in the current locale. The type values,
normally kept as longs, are returned as
Longs because of the Hashtable
requirement that all elements be Objects. maskLongValue
- public long maskLongValue(java.lang.String types)
String representation of a trace
mask to its long equivalent. The string must have the
following format:
String types = "TYPE_INFO TYPE_WARN";Unknown values in the
String are ignored.
types - The blank-delimited String to be converted. String, formed by
the logical OR of each element in the String. maskToString
- public java.lang.String maskToString( long types)
String equivalent. The string will have the
following format:
String types = "TYPE_INFO TYPE_WARN";Every extending class should override this method to add the types it supports to the value returned by its parent.
Unknown values in the long are ignored.
types - The trace mask. String equivalent of the mask. toString
- public java.lang.String toString( )
String representation of this object.
toString in class java.lang.Object
RASTraceEventobject.