com.ibm.ras

Class RASMessageEvent

  1. java.lang.Object
  2. extended bycom.ibm.ras.RASEvent
  3. extended bycom.ibm.ras.RASMessageEvent
All implemented interfaces:
RASConstants, RASIEvent, RASIMessageEvent, java.io.Serializable

Deprecated. As of WAS 6.0, recommend using java.util.logging
  1. public class RASMessageEvent
  2. extends RASEvent
  3. implements RASIMessageEvent
RASMessageEvent encapsulates all of the information generated by a RASMessageLogger. It is not necessary to create a RASMessageEvent directly, as the message logger handles this task. However, the methods of this class are public, should it be necessary to extend RASMessageEvent.

A RASMessageEvent contains the following components:

The RASMessageEvent type is defined by the set of RASIMessageEvent TYPE_XXXX constants. Values 0x0000L up to, but not including, 0x01000L are reserved. Extensions to the RASMessageEvent class may use values outside this range for additional types. The constant RASIMessageEvent.DEFAULT_MESSAGE_MASK contains the message types that the handlers log by default. It includes all message types.

See Also:
RASEvent, Serialized Form

Field Summary

Fields inherited from interface com.ibm.ras.RASIMessageEvent
ALL_MESSAGE_MASK, DEFAULT_MESSAGE_MASK, TYPE_ERR, TYPE_ERROR, TYPE_INFO, TYPE_INFORMATION, TYPE_WARN, TYPE_WARNING
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

Modifier Constructor and Description
  1. (package private)
RASMessageEvent()
Deprecated. Creates a RASMessageEvent.
  1. protected
RASMessageEvent(long type,java.lang.String text,java.lang.Object[] parms,java.lang.String messageFile)
Deprecated. Creates a RASMessageEvent.
  1. (package private)
RASMessageEvent(long type,java.lang.String text,java.lang.Object[] parms,java.lang.String messageFile,java.lang.String loggingClass,java.lang.String loggingMethod,java.lang.String org,java.lang.String prod,java.lang.String comp,java.lang.String server,java.lang.String client,java.lang.Throwable exception)
Deprecated. Creates a RASMessageEvent.
  1. protected
RASMessageEvent(long type,java.lang.String text,java.lang.String[] parms,java.lang.String messageFile)
Deprecated. Use RASMessageEvent instead.
  1. (package private)
RASMessageEvent(long type,java.lang.String text,java.lang.String[] parms,java.lang.String messageFile,java.lang.String loggingClass,java.lang.String loggingMethod,java.lang.String org,java.lang.String prod,java.lang.String comp,java.lang.String server,java.lang.String client,java.lang.Throwable exception)
Deprecated. Use RASMessageEvent instead.

Method Summary

Modifier and Type Method and Description
  1. java.lang.String
getMessageFile()
Deprecated. Gets the base message file name used to format a message.
  1. java.util.Hashtable
getSupportedTypes()
Deprecated. Gets the complete set of event types supported by this class.
  1. long
maskLongValue(java.lang.String types)
Deprecated. Converts a String representation of a message or trace mask to its long equivalent.
  1. java.lang.String
maskToString(long types)
Deprecated. Converts a long containing the logical OR of one or more event types to its String equivalent.
  1. void
setMessageFile(java.lang.String messageFile)
Deprecated. Sets the base message file name used to format a message.
  1. java.lang.String
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

RASMessageEvent

  1. public RASMessageEvent()
Deprecated.
Creates a RASMessageEvent.

RASMessageEvent

  1. protected RASMessageEvent(long type,
  2. java.lang.String text,
  3. java.lang.Object[] parms,
  4. java.lang.String messageFile)
Deprecated.
Creates a RASMessageEvent.
Parameters:
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.
messageFile - The base message file name.

RASMessageEvent

  1. protected RASMessageEvent(long type,
  2. java.lang.String text,
  3. java.lang.String[] parms,
  4. java.lang.String messageFile)
Deprecated. Use RASMessageEvent instead.
Creates a RASMessageEvent.
Parameters:
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.
messageFile - The base message file name.

RASMessageEvent

  1. public RASMessageEvent(long type,
  2. java.lang.String text,
  3. java.lang.Object[] parms,
  4. java.lang.String messageFile,
  5. java.lang.String loggingClass,
  6. java.lang.String loggingMethod,
  7. java.lang.String org,
  8. java.lang.String prod,
  9. java.lang.String comp,
  10. java.lang.String server,
  11. java.lang.String client,
  12. java.lang.Throwable exception)
Deprecated.
Creates a RASMessageEvent. The caller is expected to provide a message type, key and, if needed, any Object parameters for the message text. If any of the other parameters are not needed, they must be set to an empty string ("") or null.
Parameters:
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.
messageFile - The base message file name.
loggingClass - The class.
loggingMethod - The method.
org - The organization.
prod - The product.
comp - The component.
server - The server.
client - The client.
exception - A Throwable object.

RASMessageEvent

  1. public RASMessageEvent(long type,
  2. java.lang.String text,
  3. java.lang.String[] parms,
  4. java.lang.String messageFile,
  5. java.lang.String loggingClass,
  6. java.lang.String loggingMethod,
  7. java.lang.String org,
  8. java.lang.String prod,
  9. java.lang.String comp,
  10. java.lang.String server,
  11. java.lang.String client,
  12. java.lang.Throwable exception)
Deprecated. Use RASMessageEvent instead.
Creates a RASMessageEvent. The caller is expected to provide a message type, key and, if needed, any Object parameters for the message text. If any of the other parameters are not needed, they must be set to an empty string ("") or null.
Parameters:
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.
messageFile - The base message file name.
loggingClass - The class.
loggingMethod - The method.
org - The organization.
prod - The product.
comp - The component.
server - The server.
client - The client.
exception - A Throwable object.

Method Detail

getMessageFile

  1. public java.lang.String getMessageFile( )
Deprecated.
Gets the base message file name used to format a message.
Returns:
A message file name.

setMessageFile

  1. public void setMessageFile(java.lang.String messageFile)
Deprecated.
Sets the base message file name used to format a message.
Parameters:
messageFile - The message file name.

getSupportedTypes

  1. public java.util.Hashtable getSupportedTypes( )
Deprecated.
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.

Specified by:
Overrides:
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 longs, are returned as Longs because of the Hashtable requirement that all elements be Objects.

maskLongValue

  1. public long maskLongValue(java.lang.String types)
Deprecated.
Converts a String representation of a message or 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.
Specified by:
maskLongValue in interface RASIEvent
Overrides:
Parameters:
types - The blank-delimited String to be converted.
Returns:
The long equivalent of the String, formed by the logical OR of each element in the String.

maskToString

  1. public java.lang.String maskToString( long types)
Deprecated.
Converts a long containing the logical OR of one or more event types to its 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.

Specified by:
maskToString in interface RASIEvent
Overrides:
Parameters:
types - The message or trace mask.
Returns:
The String equivalent of the mask.

toString

  1. public java.lang.String toString( )
Deprecated.
Returns a String representation of this object.
Overrides:
toString in class java.lang.Object
Returns:
A representation of this object.