|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.ibm.ras.RASEvent
RASEvent is the parent of all
RASMessageEvent and RASTraceEvent objects. These
classes are used
within this RAS system to encapsulate the message and trace data created
by an application. An application should not need to use them. They
would only be used by a RAS implementation that wishes to extend the
function of this RAS Toolkit.
RASEvent contains the following information:
RASLogger for additional information on this important
point.
RASConstants defines the key names.
See RASMessageEvent and
RASTraceEvent for a list of attributes specific to
those classes.
RASLogger, Serialized Form| Constructor Summary | |
|---|---|
RASEvent()
Creates a RASEvent. |
|
RASEvent(long type,
java.lang.String text,
java.lang.Object[] parms)
Creates a RASEvent. |
|
RASEvent(long type,
java.lang.String text,
java.lang.String[] parms)
Deprecated. Use RASEvent instead. |
|
| Method Summary | |
|---|---|
java.lang.Object |
getAttribute(java.lang.String name)
Gets an attribute that is saved as part of a RAS event. |
java.lang.String[] |
getParameters()
Gets the text parameters: Strings to be displayed with the message text. |
java.util.Hashtable |
getSupportedTypes()
Gets the complete set of event types supported by this class. |
java.lang.String |
getText()
Gets the event text. |
long |
getTimeStamp()
Gets the time at which this event was created. |
long |
getType()
Gets the type of event: "informational message," for example. |
boolean |
isMessageEvent()
Determines if this object is a message event or a trace event. |
long |
maskLongValue(java.lang.String types)
Converts a String representation of a message or trace mask to its long equivalent. |
java.lang.String |
maskToString(long types)
Converts a long containing the logical OR of one or more event types to its String equivalent. |
protected static java.lang.String[] |
objectsToStrings(java.lang.Object[] parms)
Converts an array of Objects to an array of equivalent Strings. |
void |
setAttribute(java.lang.String name,
java.lang.Object attrib)
Sets an attribute, saving it as part of a RAS event. |
void |
setMessageEvent(boolean flag)
Sets a flag that indicates whether this object is classified as a message event or a trace event. |
void |
setParameters(java.lang.String[] parms)
Gets the text parameters: Strings to be displayed with the message text. |
void |
setText(java.lang.String text)
Sets the event text. |
void |
setTimeStamp(long timeStamp)
Sets the time at which this event was created. |
void |
setType(long type)
Sets the type of event: "informational message," for example. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RASEvent()
source - The Object which created this event.
public RASEvent(long type,
java.lang.String text,
java.lang.Object[] parms)
type - The message type.text - The message text, or a message key if the message file
is not null.parms - An array of Objects to be displayed
with the message.
public RASEvent(long type,
java.lang.String text,
java.lang.String[] parms)
RASEvent instead.
type - The message type.text - The message text, or a message key if the message file
is not null.parms - An array of Strings to be displayed
with the message.| Method Detail |
protected static java.lang.String[] objectsToStrings(java.lang.Object[] parms)
parms - An array of objects to be converted to strings.public long getTimeStamp()
getTimeStamp in interface RASIEventtimeStamp - The event time stamp, as generated by
System.currentTimeMillis.public void setTimeStamp(long timeStamp)
setTimeStamp in interface RASIEventtimeStamp - The event time stamp.public long getType()
getType in interface RASIEventpublic void setType(long type)
setType in interface RASIEventtype - The event type.public java.lang.String getText()
getText in interface RASIEventpublic void setText(java.lang.String text)
setText in interface RASIEventtext - The event text.public java.lang.String[] getParameters()
getParameters in interface RASIEventpublic void setParameters(java.lang.String[] parms)
setParameters in interface RASIEventparms - The text parameters.public java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface RASIEventname - The name of the attribute.
public void setAttribute(java.lang.String name,
java.lang.Object attrib)
setAttribute in interface RASIEventname - The name of the attribute.attrib - The attribute associated with the name.public void setMessageEvent(boolean flag)
setMessageEvent in interface RASIEventflag - A boolean set true if this
object is a message event and false if it
is a trace event.public boolean isMessageEvent()
isMessageEvent in interface RASIEventpublic 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 RASIEventHashtable
requirement that all elements be Objects.public long maskLongValue(java.lang.String types)
String types = "TYPE_INFO TYPE_WARN";Unknown values in the String are ignored.
maskLongValue in interface RASIEventtypes - The blank-delimited String to be converted.String, formed by
the logical OR of each element in the String.public java.lang.String maskToString(long types)
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.
maskToString in interface RASIEventtypes - The message or trace mask.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||