Class RASTraceEvent
- java.lang.Object
-
- com.ibm.ras.RASEvent
-
- com.ibm.ras.RASTraceEvent
-
- All Implemented Interfaces:
- RASConstants, RASIEvent, RASITraceEvent, java.io.Serializable
Deprecated.As of WAS 6.0, recommend using java.util.logging
public class RASTraceEvent extends RASEvent implements RASITraceEvent
RASTraceEventencapsulates all of the information generated byRASTraceLogger. It is not necessary to create aRASTraceEventdirectly, as theRASTraceLoggerhandles this task. However, the methods of this class are public, should it be necessary to extendRASTraceEvent.A
RASTraceEventobject 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
RASTraceEventtype is defined by the set ofRASITraceEventTYPE_XXXXconstants. Values 0x000000 up to, but not including, 0x100000L are reserved. Extensions to theRASTraceEventclass may use values outside this range for additional types. The constantRASITraceEvent.DEFAULT_TRACE_MASKcontains the set ofRASTraceEventtypes 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;
- See Also:
RASEvent, Serialized Form
-
-
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_FFDC, 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
-
Fields inherited from interface com.ibm.ras.RASConstants
KEY_CLASS_NAME, KEY_CLIENT, KEY_COMPONENT, KEY_DATE_FORMAT, KEY_DEFAULT_HANDLERS, KEY_DEFAULT_MESSAGE_HANDLERS, KEY_DEFAULT_TRACE_HANDLERS, KEY_DESCRIPTION, KEY_ENCODING, KEY_EXCEPTION, KEY_EXCEPTION_TRACE, KEY_FILE_NAME, KEY_FORMATTER_NAMES, KEY_GROUP, KEY_HANDLER_NAMES, KEY_HEX_DATA, KEY_IS_CIRCULAR, KEY_IS_LOGGING, KEY_IS_SYNC, KEY_LOGGER, KEY_LOGGING_CLASS, KEY_LOGGING_METHOD, KEY_MAX_FILE_SIZE, KEY_MAX_FILES, KEY_MAX_QUEUE_SIZE, KEY_MESSAGE_EVENT_CLASSES, KEY_MESSAGE_FILE, KEY_MESSAGE_MASK, KEY_NAME, KEY_ORGANIZATION, KEY_PRODUCT, KEY_RETRY_INTERVAL, KEY_SEPARATOR, KEY_SERVER, KEY_SOCKET_PORT, KEY_SOCKET_SERVER, KEY_SUPPRESSED_KEYS, KEY_THREAD_ID, KEY_TIME_FORMAT, KEY_TRACE_EVENT_CLASSES, KEY_TRACE_MASK, RAS_VERSION
-
-
Constructor Summary
Constructors Modifier Constructor and Description RASTraceEvent()Deprecated.Creates aRASTraceEventobject.protectedRASTraceEvent(long type, java.lang.String text, java.lang.Object[] parms)Deprecated.Creates aRASTraceEventobject.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 aRASTraceEventobject.protectedRASTraceEvent(long type, java.lang.String text, java.lang.String[] parms)Deprecated.UseRASTraceEventinstead.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.UseRASTraceEventinstead.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 aRASTraceEventobject.
-
Method Summary
Methods Modifier and Type Method and Description java.util.HashtablegetSupportedTypes()Deprecated.Gets the complete set of trace event types supported by this class.longmaskLongValue(java.lang.String types)Deprecated.Converts aStringrepresentation of a trace mask to itslongequivalent.java.lang.StringmaskToString(long types)Deprecated.Converts a long containing the logical OR of one or more event types to itsStringequivalent.java.lang.StringtoString()Deprecated.Returns aStringrepresentation of this object.-
Methods inherited from class com.ibm.ras.RASEvent
getAttribute, getParameters, getText, getTimeStamp, getType, isMessageEvent, objectsToStrings, setAttribute, setMessageEvent, setParameters, setText, setTimeStamp, setType
-
-
-
-
Constructor Detail
-
RASTraceEvent
public RASTraceEvent()
Deprecated.Creates aRASTraceEventobject.
-
RASTraceEvent
protected RASTraceEvent(long type, java.lang.String text, java.lang.Object[] parms)Deprecated.Creates aRASTraceEventobject.- Parameters:
type- The type of trace event.text- The trace text.parms- An array ofObjectsto be displayed with the trace text.
-
RASTraceEvent
protected RASTraceEvent(long type, java.lang.String text, java.lang.String[] parms)Deprecated. UseRASTraceEventinstead.Creates aRASTraceEventobject.- Parameters:
type- The type of trace event.text- The trace text.parms- An array ofStringsto 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)Deprecated.Creates aRASTraceEventobject.- Parameters:
type- The type of trace event.text- The trace text.parms- An array ofObjectsto be displayed with the trace text.loggingClass- The class.loggingMethod- The method.logger- TheRASITraceLoggerwhich created thisRASTraceEvent.server- The server.client- The client.exception- AThrowableobject.
-
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)Deprecated. UseRASTraceEventinstead.Creates aRASTraceEventobject.- Parameters:
type- The type of trace event.text- The trace text.parms- An array ofStringsto be displayed with the trace text.loggingClass- The class.loggingMethod- The method.logger- TheRASITraceLoggerwhich created thisRASTraceEvent.server- The server.client- The client.exception- AThrowableobject.
-
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)Deprecated.Creates aRASTraceEventobject.- Parameters:
type- The type of trace event.loggingClass- The class.loggingMethod- The method.logger- TheRASITraceLoggerwhich created thisRASTraceEvent.server- The server.client- The client.data- An array of bytes.
-
-
Method Detail
-
getSupportedTypes
public java.util.Hashtable getSupportedTypes()
Deprecated.Gets the complete set of trace event types supported by this class.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
Hashtablereturned by its parent.- Specified by:
getSupportedTypesin interfaceRASIEvent- Overrides:
getSupportedTypesin classRASEvent- Returns:
- A
Hashtablecontaining 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 aslongs, are returned asLongsbecause of theHashtablerequirement that all elements beObjects.
-
maskLongValue
public long maskLongValue(java.lang.String types)
Deprecated.Converts aStringrepresentation of a trace mask to itslongequivalent. The string must have the following format:String types = "TYPE_INFO TYPE_WARN";
Unknown values in theStringare ignored.- Specified by:
maskLongValuein interfaceRASIEvent- Overrides:
maskLongValuein classRASEvent- Parameters:
types- The blank-delimitedStringto be converted.- Returns:
- The long equivalent of the
String, formed by the logical OR of each element in theString.
-
maskToString
public java.lang.String maskToString(long types)
Deprecated.Converts a long containing the logical OR of one or more event types to itsStringequivalent. 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
longare ignored.- Specified by:
maskToStringin interfaceRASIEvent- Overrides:
maskToStringin classRASEvent- Parameters:
types- The trace mask.- Returns:
- The
Stringequivalent of the mask.
-
toString
public java.lang.String toString()
Deprecated.Returns aStringrepresentation of this object.- Overrides:
toStringin classjava.lang.Object- Returns:
- A representation of this object.
-
-