Class RASMaskChangeGenerator
- java.lang.Object
-
- com.ibm.ras.RASObject
-
- com.ibm.ras.RASMaskChangeGenerator
-
- All Implemented Interfaces:
- RASConstants, RASIMaskChangeGenerator, RASIObject, java.io.Serializable, java.lang.Cloneable
- Direct Known Subclasses:
- RASLogger
Deprecated.As of WAS 6.0, recommend using java.util.logging
public class RASMaskChangeGenerator extends RASObject implements RASIMaskChangeGenerator
RASMaskChangeGenerator
implements theRASIMaskChangeGenerator
interface. It is responsible for controlling the message and trace masks and for informingRASIMaskChangeListener
that a change has occurred in the object's message or trace mask.RASMaskChangeGenerator
also provides methods that allow it to know whichRASIEvent
classes it can query to learn the event type values that might be used in its message or trace masks. This information can also be presented to a graphical program to display these event types to an end user.This class provides common function to loggers and handlers and is not intended to be instantiated directly. The
RASLogger
and Handler classes extend this class.- See Also:
- Serialized Form
-
-
Field Summary
-
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 Constructor and Description RASMaskChangeGenerator()
Deprecated.Creates aRASMaskChangeGenerator
.RASMaskChangeGenerator(java.lang.String name)
Deprecated.Creates aRASMaskChangeGenerator
.RASMaskChangeGenerator(java.lang.String name, java.lang.String desc)
Deprecated.Creates aRASMaskChangeGenerator
.
-
Method Summary
Methods Modifier and Type Method and Description void
addMaskChangeListener(RASIMaskChangeListener listener)
Deprecated.Adds an object that wishes to be informed of changes in the message or trace mask configuration.void
addMessageEventClass(java.lang.String name)
Deprecated.Adds the name of a message event class which this object uses.void
addTraceEventClass(java.lang.String name)
Deprecated.Adds the name of a trace event class which this object uses.void
fireMaskChangedEvent(RASMaskChangeEvent mc)
Deprecated.Tells allRASIMaskChangeListeners
that the message or trace mask has been changed.java.util.Hashtable
getConfig()
Deprecated.Gets the configuration of this object.java.util.Enumeration
getMaskChangeListeners()
Deprecated.Gets the set of objects that wish to be informed of changes in the message or trace mask configuration.java.util.Enumeration
getMessageEventClasses()
Deprecated.Gets the set of message event classes which this object uses.long
getMessageMask()
Deprecated.Gets the mask which defines the set of message types that will be processed.java.util.Enumeration
getTraceEventClasses()
Deprecated.Gets the set of trace event classes which this object uses.long
getTraceMask()
Deprecated.Gets the mask which defines the set of trace types that will be processed.protected void
init()
Deprecated.Initializes this object, setting default values.long
messageMaskLongValue(java.lang.String types)
Deprecated.Gets a composite message mask by asking each of the registered event classes to convert its known mask strings to a long value.java.lang.String
messageMaskToString(long types)
Deprecated.Gets a composite message mask by asking each of the registered event classes to convert its known mask to a string value.void
removeMaskChangeListener(RASIMaskChangeListener listener)
Deprecated.Removes an object from the list that wishes to be informed of changes in the message or trace mask configuration.void
removeMessageEventClass(java.lang.String name)
Deprecated.Removes the name of a message event class from the list of classes which this object uses.void
removeTraceEventClass(java.lang.String name)
Deprecated.Removes the name of a trace event class from the list of classes which this object uses.void
setConfig(java.util.Hashtable ht)
Deprecated.Sets the configuration of this object.void
setMessageMask(long mask)
Deprecated.Sets the mask which defines the set of message types that will be processed.void
setTraceMask(long mask)
Deprecated.Sets the mask which defines the set of trace types that will be processed.long
traceMaskLongValue(java.lang.String types)
Deprecated.Gets a composite trace mask by asking each of the registered event classes to convert its known mask strings to a long value.java.lang.String
traceMaskToString(long types)
Deprecated.Gets a composite trace mask by asking each of the registered event classes to convert its known mask to a string value.-
Methods inherited from class com.ibm.ras.RASObject
clone, getDescription, getGroup, getName, setDescription, setName
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.ras.RASIObject
getDescription, getGroup, getName, setDescription, setName
-
-
-
-
Constructor Detail
-
RASMaskChangeGenerator
public RASMaskChangeGenerator()
Deprecated.Creates aRASMaskChangeGenerator
. The name and description of this object are empty strings.
-
RASMaskChangeGenerator
public RASMaskChangeGenerator(java.lang.String name)
Deprecated.Creates aRASMaskChangeGenerator
. The description of this object is an empty string.- Parameters:
name
- The name of this object.
-
RASMaskChangeGenerator
public RASMaskChangeGenerator(java.lang.String name, java.lang.String desc)
Deprecated.Creates aRASMaskChangeGenerator
.- Parameters:
name
- The name of this object.desc
- The description of this object.
-
-
Method Detail
-
init
protected void init()
Deprecated.Initializes this object, setting default values.
-
getConfig
public java.util.Hashtable getConfig()
Deprecated.Gets the configuration of this object.- Specified by:
getConfig
in interfaceRASIMaskChangeGenerator
- Specified by:
getConfig
in interfaceRASIObject
- Overrides:
getConfig
in classRASObject
- Returns:
- A
Hashtable
containing the configuration. This object inserts the following key/value pairs into the the configuration:- messageMask
- The mask which selects the message types to be processed.
- traceMask
- The mask which selects the trace types to be processed.
- messageEventClasses
- A blank-delimited list of message event classes which this object uses.
- traceEventClasses
- A blank-delimited list of trace event classes which this object uses.
All values are
Strings
. The parent and extensions of this object may use additional keys.
-
setConfig
public void setConfig(java.util.Hashtable ht)
Deprecated.Sets the configuration of this object. This method is used by aRASManager
to initialize a RAS object. It should not be necessary for an application to use this method.- Specified by:
setConfig
in interfaceRASIMaskChangeGenerator
- Specified by:
setConfig
in interfaceRASIObject
- Overrides:
setConfig
in classRASObject
- Parameters:
ht
- AHashtable
containing the configuration. This object searches for the following keys:- messageMask
- The mask which selects the message types to be processed.
- traceMask
- The mask which selects the trace types to be processed.
- messageEventClasses
- A blank-delimited list of message event classes which this object uses.
- traceEventClasses
- A blank-delimited list of trace event classes which this object uses.
All values are
Strings
. If a key is not found, an internal default for that element is set instead. The parent and extensions of this object may use additional keys.
-
getMessageMask
public long getMessageMask()
Deprecated.Gets the mask which defines the set of message types that will be processed. Possible values are defined by the logical OR of theRASIMessageEvent
TYPE_XXXX
constants.- Specified by:
getMessageMask
in interfaceRASIMaskChangeGenerator
- Returns:
- The message mask.
-
setMessageMask
public void setMessageMask(long mask)
Deprecated.Sets the mask which defines the set of message types that will be processed. Possible values are defined by theRASIMessageEvent
TYPE_XXXX
constants. The mask value is not validated against these types.- Specified by:
setMessageMask
in interfaceRASIMaskChangeGenerator
- Parameters:
mask
- The message mask.
-
getTraceMask
public long getTraceMask()
Deprecated.Gets the mask which defines the set of trace types that will be processed. Possible values are defined by the logical OR of theRASITraceEvent
TYPE_XXXX
constants.- Specified by:
getTraceMask
in interfaceRASIMaskChangeGenerator
- Returns:
- The trace mask.
-
setTraceMask
public void setTraceMask(long mask)
Deprecated.Sets the mask which defines the set of trace types that will be processed. Possible values are defined by theRASITraceEvent
TYPE_XXXX
constants. The mask value is not validated against these types.- Specified by:
setTraceMask
in interfaceRASIMaskChangeGenerator
- Parameters:
mask
- The trace mask.
-
addMaskChangeListener
public void addMaskChangeListener(RASIMaskChangeListener listener)
Deprecated.Adds an object that wishes to be informed of changes in the message or trace mask configuration. If the listener isnull
or is already registered, this method does nothing.- Specified by:
addMaskChangeListener
in interfaceRASIMaskChangeGenerator
- Parameters:
listener
- The mask change listener.
-
removeMaskChangeListener
public void removeMaskChangeListener(RASIMaskChangeListener listener)
Deprecated.Removes an object from the list that wishes to be informed of changes in the message or trace mask configuration. If the listener isnull
or is not registered, this method does nothing.- Specified by:
removeMaskChangeListener
in interfaceRASIMaskChangeGenerator
- Parameters:
listener
- The mask change listener.
-
getMaskChangeListeners
public java.util.Enumeration getMaskChangeListeners()
Deprecated.Gets the set of objects that wish to be informed of changes in the message or trace mask configuration.- Specified by:
getMaskChangeListeners
in interfaceRASIMaskChangeGenerator
- Returns:
- An
Enumeration
of mask change listeners. If no listeners are registered, theEnumeration
is empty.
-
fireMaskChangedEvent
public void fireMaskChangedEvent(RASMaskChangeEvent mc)
Deprecated.Tells allRASIMaskChangeListeners
that the message or trace mask has been changed.- Specified by:
fireMaskChangedEvent
in interfaceRASIMaskChangeGenerator
- Parameters:
mc
- A mask change event, indicating what has changed.
-
addMessageEventClass
public void addMessageEventClass(java.lang.String name)
Deprecated.Adds the name of a message event class which this object uses. If the event class isnull
or is already registered, this method does nothing.- Specified by:
addMessageEventClass
in interfaceRASIMaskChangeGenerator
- Parameters:
name
- The event class name.
-
removeMessageEventClass
public void removeMessageEventClass(java.lang.String name)
Deprecated.Removes the name of a message event class from the list of classes which this object uses. If the event class isnull
or is not registered, this method does nothing.- Specified by:
removeMessageEventClass
in interfaceRASIMaskChangeGenerator
- Parameters:
name
- The event class name.
-
getMessageEventClasses
public java.util.Enumeration getMessageEventClasses()
Deprecated.Gets the set of message event classes which this object uses.- Specified by:
getMessageEventClasses
in interfaceRASIMaskChangeGenerator
- Returns:
- An
Enumeration
of RAS event class names. If no event classes are registered, theEnumeration
is empty.
-
addTraceEventClass
public void addTraceEventClass(java.lang.String name)
Deprecated.Adds the name of a trace event class which this object uses. If the event class isnull
or is already registered, this method does nothing.- Specified by:
addTraceEventClass
in interfaceRASIMaskChangeGenerator
- Parameters:
name
- The event class name.
-
removeTraceEventClass
public void removeTraceEventClass(java.lang.String name)
Deprecated.Removes the name of a trace event class from the list of classes which this object uses. If the event class isnull
or is not registered, this method does nothing.- Specified by:
removeTraceEventClass
in interfaceRASIMaskChangeGenerator
- Parameters:
name
- The event class name.
-
getTraceEventClasses
public java.util.Enumeration getTraceEventClasses()
Deprecated.Gets the set of trace event classes which this object uses.- Specified by:
getTraceEventClasses
in interfaceRASIMaskChangeGenerator
- Returns:
- An
Enumeration
of RAS event class names. If no event classes are registered, theEnumeration
is empty.
-
messageMaskLongValue
public long messageMaskLongValue(java.lang.String types)
Deprecated.Gets a composite message mask by asking each of the registered event classes to convert its known mask strings to a long value.- Parameters:
types
- A blank-delimited list of event types.- Returns:
- The mask value compiled from each registered event class.
-
messageMaskToString
public java.lang.String messageMaskToString(long types)
Deprecated.Gets a composite message mask by asking each of the registered event classes to convert its known mask to a string value.- Parameters:
types
- A message or trace mask.- Returns:
- The string corresponding to the event types.
-
traceMaskLongValue
public long traceMaskLongValue(java.lang.String types)
Deprecated.Gets a composite trace mask by asking each of the registered event classes to convert its known mask strings to a long value.- Parameters:
types
- A blank-delimited list of event types.- Returns:
- The mask value compiled from each registered event class.
-
traceMaskToString
public java.lang.String traceMaskToString(long types)
Deprecated.Gets a composite trace mask by asking each of the registered event classes to convert its known mask to a string value.- Parameters:
types
- A message or trace mask.- Returns:
- The string corresponding to the event types.
-
-