|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.ras.RASEvent | +--com.ibm.ras.RASTraceEvent
A RASTraceEvent
encapsulates all of the information generated by
a 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:
RASTraceEvent
is created.
RASTraceEvent
messages.
Strings
which can be displayed with the message text.
These parameters are required only if the message expects them.
Objects
associated with the attributes are Strings
.
"className" The name of the Java class which generated the message. "methodName" The name of the Java method which generated the message. "threadID" The thread identifier. "logger" The name of theRASTraceLogger
which created the message. "server" A server associated with the creation of the message. "client" The client on whose behalf the message was created. "exception" AnException
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 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;
RASEvent
,
RASTraceLogger
,
RASHandler
, Serialized FormConstructor Summary | |
RASTraceEvent(long type,
java.lang.String text,
java.lang.String[] parms,
java.lang.String className,
java.lang.String methodName,
RASITraceLogger logger,
java.lang.String server,
java.lang.String client,
java.lang.Exception exception)
Creates a RASTraceEvent object. |
Method Summary | |
java.util.Hashtable |
getSupportedTypes()
Gets the complete set of trace event types supported by this class. |
static long |
maskLongValue(java.lang.String types)
Converts a String representation of the trace mask
to its long equivalent. |
static java.lang.String |
maskToString(long types)
Converts a long containing the logical OR of one or more RASITraceEvent.TYPE_XXXX constants to its String
equivalent. |
Methods inherited from class com.ibm.ras.RASEvent |
getAttribute,
getParameters,
getText,
getTimeStamp,
getType,
isMessageEvent,
setAttribute,
setMessageEvent,
setParameters,
setText,
setTimeStamp,
setType |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public RASTraceEvent(long type, java.lang.String text, java.lang.String[] parms, java.lang.String className, java.lang.String methodName, RASITraceLogger logger, java.lang.String server, java.lang.String client, java.lang.Exception exception)
RASTraceEvent
object.type
- The type of trace event.text
- The trace text.parms
- An array of Strings
to be displayed
with the message.className
- The class.methodName
- The method.logger
- The RASITraceLogger
which created this
RASTraceEvent
.server
- The server.client
- The client.exception
- An exception.Method Detail |
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.
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
.public static long maskLongValue(java.lang.String types)
String
representation of the trace mask
to its long equivalent. The string must have the following format:
String types = "TYPE_API TYPE_PRIVATE TYPE_HIGH_USE";DEFAULT_TRACE_MASK may also be included in the string. (These values are the names of the
RASITraceEvent.TYPE_XXXX
constants.)
Every extending class should override this method to add the types it
supports to the value returned by its parent.
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
.public static java.lang.String maskToString(long types)
RASITraceEvent.TYPE_XXXX
constants to its String
equivalent. The string will have the following format:
String types = "TYPE_API TYPE_PRIVATE TYPE_HIGH_USE";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 trace mask.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |