|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.ras.RASObject | +--com.ibm.ras.RASMaskChangeGenerator
RASMaskChangeGenerator implements the
RASIMaskChangeGenerator
interface.
It is responsible for controlling the message and trace masks and for
informing RASIMaskChangeListener
that
a change has occurred in the object's message or trace mask.
RASMaskChangeGenerator also provides methods that
allow it to know which RASIEvent
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.
Constructor Summary | |
---|---|
RASMaskChangeGenerator()
Creates a RASMaskChangeGenerator. |
|
RASMaskChangeGenerator(java.lang.String name)
Creates a RASMaskChangeGenerator. |
|
RASMaskChangeGenerator(java.lang.String name,
java.lang.String desc)
Creates a RASMaskChangeGenerator. |
Method Summary | |
---|---|
void |
addMaskChangeListener(RASIMaskChangeListener listener)
Adds an object that wishes to be informed of changes in the message or trace mask configuration. |
void |
addMessageEventClass(java.lang.String name)
Adds the name of a message event class which this object uses. |
void |
addTraceEventClass(java.lang.String name)
Adds the name of a trace event class which this object uses. |
void |
fireMaskChangedEvent(RASMaskChangeEvent mc)
Tells all RASIMaskChangeListeners that the message or trace mask has been changed. |
java.util.Hashtable |
getConfig()
Gets the configuration of this object. |
java.util.Enumeration |
getMaskChangeListeners()
Gets the set of objects that wish to be informed of changes in the message or trace mask configuration. |
java.util.Enumeration |
getMessageEventClasses()
Gets the set of message event classes which this object uses. |
long |
getMessageMask()
Gets the mask which defines the set of message types that will be processed. |
java.util.Enumeration |
getTraceEventClasses()
Gets the set of trace event classes which this object uses. |
long |
getTraceMask()
Gets the mask which defines the set of trace types that will be processed. |
protected void |
init()
Initializes this object, setting default values. |
long |
messageMaskLongValue(java.lang.String types)
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)
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)
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)
Removes the name of a message event class from the list of classes which this object uses. |
void |
removeTraceEventClass(java.lang.String name)
Removes the name of a trace event class from the list of classes which this object uses. |
void |
setConfig(java.util.Hashtable ht)
Sets the configuration of this object. |
void |
setMessageMask(long mask)
Sets the mask which defines the set of message types that will be processed. |
void |
setTraceMask(long mask)
Sets the mask which defines the set of trace types that will be processed. |
long |
traceMaskLongValue(java.lang.String types)
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)
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 |
public RASMaskChangeGenerator()
public RASMaskChangeGenerator(java.lang.String name)
name
- The name of this object.public RASMaskChangeGenerator(java.lang.String name, java.lang.String desc)
name
- The name of this object.desc
- The description of this object.Method Detail |
protected void init()
init
in class RASObject
public java.util.Hashtable getConfig()
getConfig
in interface RASIMaskChangeGenerator
getConfig
in class RASObject
All values are Strings. The parent and extensions of this object may use additional keys.
public void setConfig(java.util.Hashtable ht)
setConfig
in interface RASIMaskChangeGenerator
setConfig
in class RASObject
ht
- A Hashtable containing the configuration.
This object searches for the following keys:
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.
public long getMessageMask()
RASIMessageEvent
TYPE_XXXX constants.getMessageMask
in interface RASIMaskChangeGenerator
public void setMessageMask(long mask)
RASIMessageEvent
TYPE_XXXX constants.
The mask value is not validated against these types.setMessageMask
in interface RASIMaskChangeGenerator
mask
- The message mask.public long getTraceMask()
RASITraceEvent
TYPE_XXXX constants.getTraceMask
in interface RASIMaskChangeGenerator
public void setTraceMask(long mask)
RASITraceEvent
TYPE_XXXX constants.
The mask value is not validated against these types.setTraceMask
in interface RASIMaskChangeGenerator
mask
- The trace mask.public void addMaskChangeListener(RASIMaskChangeListener listener)
addMaskChangeListener
in interface RASIMaskChangeGenerator
listener
- The mask change listener.public void removeMaskChangeListener(RASIMaskChangeListener listener)
removeMaskChangeListener
in interface RASIMaskChangeGenerator
listener
- The mask change listener.public java.util.Enumeration getMaskChangeListeners()
getMaskChangeListeners
in interface RASIMaskChangeGenerator
public void fireMaskChangedEvent(RASMaskChangeEvent mc)
fireMaskChangedEvent
in interface RASIMaskChangeGenerator
mc
- A mask change event, indicating what has changed.public void addMessageEventClass(java.lang.String name)
addMessageEventClass
in interface RASIMaskChangeGenerator
name
- The event class name.public void removeMessageEventClass(java.lang.String name)
removeMessageEventClass
in interface RASIMaskChangeGenerator
name
- The event class name.public java.util.Enumeration getMessageEventClasses()
getMessageEventClasses
in interface RASIMaskChangeGenerator
public void addTraceEventClass(java.lang.String name)
addTraceEventClass
in interface RASIMaskChangeGenerator
name
- The event class name.public void removeTraceEventClass(java.lang.String name)
removeTraceEventClass
in interface RASIMaskChangeGenerator
name
- The event class name.public java.util.Enumeration getTraceEventClasses()
getTraceEventClasses
in interface RASIMaskChangeGenerator
public long messageMaskLongValue(java.lang.String types)
types
- A blank-delimited list of event types.public java.lang.String messageMaskToString(long types)
types
- A message or trace mask.public long traceMaskLongValue(java.lang.String types)
types
- A blank-delimited list of event types.public java.lang.String traceMaskToString(long types)
types
- A message or trace mask.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |