com.ibm.ras
Interface RASIEvent

All Known Implementing Classes:
RASEvent

public abstract interface RASIEvent
extends java.io.Serializable

RASIEvent defines the methods that must be implemented to contain RAS message or trace data. Within the RAS Toolkit, RASIEvent is implemented by the RASEvent class.

See Also:
RASEvent

Fields inherited from class java.io.Serializable
serialVersionUID
 
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.
 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 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.
 

Method Detail

getTimeStamp

public long getTimeStamp()
Gets the time at which this event was created.
Parameters:
timeStamp - The event time stamp, as generated by System.currentTimeMillis.

setTimeStamp

public void setTimeStamp(long timeStamp)
Sets the time at which this event was created. This value is expected to be of the format returned by System.currentTimeMillis.
Parameters:
timeStamp - The event time stamp.

getType

public long getType()
Gets the type of event: "informational message," for example. Specific types are defined by the classes which extend RASEvent.
Returns:
The event type.

setType

public void setType(long type)
Sets the type of event: "informational message," for example. Specific types are defined by the classes which extend RASEvent.
Parameters:
type - The event type.

getText

public java.lang.String getText()
Gets the event text.
Returns:
The event text.

setText

public void setText(java.lang.String text)
Sets the event text.
Parameters:
text - The event text.

getParameters

public java.lang.String[] getParameters()
Gets the text parameters: Strings to be displayed with the message text.
Returns:
The text parameters.

setParameters

public void setParameters(java.lang.String[] parms)
Gets the text parameters: Strings to be displayed with the message text.
Parameters:
parms - The text parameters.

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Gets an attribute that is saved as part of a RAS event.
Parameters:
name - The name of the attribute.
Returns:
The attribute associated with the name or null if the named attribute was not found.

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object attrib)
Sets an attribute, saving it as part of a RAS event. If the name or the attribute are null, nothing is saved.
Parameters:
name - The name of the attribute.
attrib - The attribute associated with the name.

setMessageEvent

public void setMessageEvent(boolean flag)
Sets a flag that that indicates whether this object is classified as a message event or a trace event.
Parameters:
flag - A boolean set true if this object is a message event and false if it is a trace event.

isMessageEvent

public boolean isMessageEvent()
Determines if this object is a message event or a trace event.
Returns:
true if this object is a message event and false if it is a trace event.

getSupportedTypes

public java.util.Hashtable getSupportedTypes()
Gets the complete set of 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 Hashtable returned by its parent.

Returns:
A Hashtable containing the values of all of the event types. The names of the types are used as keys and are returned in the current locale. The type values, normally kept as ints, are returned as Integers because of the Hashtable requirement that all elements be Objects.