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
RASMaskChangeGeneratorimplements theRASIMaskChangeGeneratorinterface. It is responsible for controlling the message and trace masks and for informingRASIMaskChangeListenerthat a change has occurred in the object's message or trace mask.RASMaskChangeGeneratoralso provides methods that allow it to know whichRASIEventclasses 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
RASLoggerand 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 voidaddMaskChangeListener(RASIMaskChangeListener listener)Deprecated.Adds an object that wishes to be informed of changes in the message or trace mask configuration.voidaddMessageEventClass(java.lang.String name)Deprecated.Adds the name of a message event class which this object uses.voidaddTraceEventClass(java.lang.String name)Deprecated.Adds the name of a trace event class which this object uses.voidfireMaskChangedEvent(RASMaskChangeEvent mc)Deprecated.Tells allRASIMaskChangeListenersthat the message or trace mask has been changed.java.util.HashtablegetConfig()Deprecated.Gets the configuration of this object.java.util.EnumerationgetMaskChangeListeners()Deprecated.Gets the set of objects that wish to be informed of changes in the message or trace mask configuration.java.util.EnumerationgetMessageEventClasses()Deprecated.Gets the set of message event classes which this object uses.longgetMessageMask()Deprecated.Gets the mask which defines the set of message types that will be processed.java.util.EnumerationgetTraceEventClasses()Deprecated.Gets the set of trace event classes which this object uses.longgetTraceMask()Deprecated.Gets the mask which defines the set of trace types that will be processed.protected voidinit()Deprecated.Initializes this object, setting default values.longmessageMaskLongValue(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.StringmessageMaskToString(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.voidremoveMaskChangeListener(RASIMaskChangeListener listener)Deprecated.Removes an object from the list that wishes to be informed of changes in the message or trace mask configuration.voidremoveMessageEventClass(java.lang.String name)Deprecated.Removes the name of a message event class from the list of classes which this object uses.voidremoveTraceEventClass(java.lang.String name)Deprecated.Removes the name of a trace event class from the list of classes which this object uses.voidsetConfig(java.util.Hashtable ht)Deprecated.Sets the configuration of this object.voidsetMessageMask(long mask)Deprecated.Sets the mask which defines the set of message types that will be processed.voidsetTraceMask(long mask)Deprecated.Sets the mask which defines the set of trace types that will be processed.longtraceMaskLongValue(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.StringtraceMaskToString(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:
getConfigin interfaceRASIMaskChangeGenerator- Specified by:
getConfigin interfaceRASIObject- Overrides:
getConfigin classRASObject- Returns:
- A
Hashtablecontaining 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 aRASManagerto initialize a RAS object. It should not be necessary for an application to use this method.- Specified by:
setConfigin interfaceRASIMaskChangeGenerator- Specified by:
setConfigin interfaceRASIObject- Overrides:
setConfigin classRASObject- Parameters:
ht- AHashtablecontaining 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 theRASIMessageEventTYPE_XXXXconstants.- Specified by:
getMessageMaskin 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 theRASIMessageEventTYPE_XXXXconstants. The mask value is not validated against these types.- Specified by:
setMessageMaskin 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 theRASITraceEventTYPE_XXXXconstants.- Specified by:
getTraceMaskin 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 theRASITraceEventTYPE_XXXXconstants. The mask value is not validated against these types.- Specified by:
setTraceMaskin 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 isnullor is already registered, this method does nothing.- Specified by:
addMaskChangeListenerin 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 isnullor is not registered, this method does nothing.- Specified by:
removeMaskChangeListenerin 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:
getMaskChangeListenersin interfaceRASIMaskChangeGenerator- Returns:
- An
Enumerationof mask change listeners. If no listeners are registered, theEnumerationis empty.
-
fireMaskChangedEvent
public void fireMaskChangedEvent(RASMaskChangeEvent mc)
Deprecated.Tells allRASIMaskChangeListenersthat the message or trace mask has been changed.- Specified by:
fireMaskChangedEventin 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 isnullor is already registered, this method does nothing.- Specified by:
addMessageEventClassin 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 isnullor is not registered, this method does nothing.- Specified by:
removeMessageEventClassin 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:
getMessageEventClassesin interfaceRASIMaskChangeGenerator- Returns:
- An
Enumerationof RAS event class names. If no event classes are registered, theEnumerationis 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 isnullor is already registered, this method does nothing.- Specified by:
addTraceEventClassin 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 isnullor is not registered, this method does nothing.- Specified by:
removeTraceEventClassin 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:
getTraceEventClassesin interfaceRASIMaskChangeGenerator- Returns:
- An
Enumerationof RAS event class names. If no event classes are registered, theEnumerationis 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.
-
-