public class RASMaskChangeGenerator extends RASObject implements RASIMaskChangeGenerator
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.
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 and Description |
|---|
RASMaskChangeGenerator()
Deprecated.
Creates a
RASMaskChangeGenerator. |
RASMaskChangeGenerator(java.lang.String name)
Deprecated.
Creates a
RASMaskChangeGenerator. |
RASMaskChangeGenerator(java.lang.String name,
java.lang.String desc)
Deprecated.
Creates a
RASMaskChangeGenerator. |
| 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 all
RASIMaskChangeListeners 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.
|
clone, getDescription, getGroup, getName, setDescription, setNameequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDescription, getGroup, getName, setDescription, setNamepublic RASMaskChangeGenerator()
RASMaskChangeGenerator. The name and description of
this object are empty strings.public RASMaskChangeGenerator(java.lang.String name)
RASMaskChangeGenerator. The description of this object
is an empty string.name - The name of this object.public RASMaskChangeGenerator(java.lang.String name,
java.lang.String desc)
RASMaskChangeGenerator.name - The name of this object.desc - The description of this object.protected void init()
public java.util.Hashtable getConfig()
getConfig in interface RASIMaskChangeGeneratorgetConfig in interface RASIObjectgetConfig in class RASObjectHashtable containing the configuration.
This object inserts the following key/value pairs into the
the configuration:
All values are Strings.
The parent and extensions of this object may use additional keys.
public void setConfig(java.util.Hashtable ht)
RASManager to initialize a RAS object.
It should not be necessary for an application to use this method.setConfig in interface RASIMaskChangeGeneratorsetConfig in interface RASIObjectsetConfig in class RASObjectht - 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 RASIMaskChangeGeneratorpublic void setMessageMask(long mask)
RASIMessageEvent TYPE_XXXX constants.
The mask value is not validated against these types.setMessageMask in interface RASIMaskChangeGeneratormask - The message mask.public long getTraceMask()
RASITraceEvent TYPE_XXXX constants.getTraceMask in interface RASIMaskChangeGeneratorpublic void setTraceMask(long mask)
RASITraceEvent TYPE_XXXX constants.
The mask value is not validated against these types.setTraceMask in interface RASIMaskChangeGeneratormask - The trace mask.public void addMaskChangeListener(RASIMaskChangeListener listener)
null or is already registered, this method does nothing.addMaskChangeListener in interface RASIMaskChangeGeneratorlistener - The mask change listener.public void removeMaskChangeListener(RASIMaskChangeListener listener)
null or is not registered, this method does
nothing.removeMaskChangeListener in interface RASIMaskChangeGeneratorlistener - The mask change listener.public java.util.Enumeration getMaskChangeListeners()
getMaskChangeListeners in interface RASIMaskChangeGeneratorEnumeration of mask change listeners. If
no listeners are registered, the Enumeration
is empty.public void fireMaskChangedEvent(RASMaskChangeEvent mc)
RASIMaskChangeListeners that the message or
trace mask has been changed.fireMaskChangedEvent in interface RASIMaskChangeGeneratormc - A mask change event, indicating what has changed.public void addMessageEventClass(java.lang.String name)
null or is already
registered, this method does nothing.addMessageEventClass in interface RASIMaskChangeGeneratorname - The event class name.public void removeMessageEventClass(java.lang.String name)
null or is not registered, this method does nothing.removeMessageEventClass in interface RASIMaskChangeGeneratorname - The event class name.public java.util.Enumeration getMessageEventClasses()
getMessageEventClasses in interface RASIMaskChangeGeneratorEnumeration of RAS event class names. If
no event classes are registered, the Enumeration
is empty.public void addTraceEventClass(java.lang.String name)
null or is already
registered, this method does nothing.addTraceEventClass in interface RASIMaskChangeGeneratorname - The event class name.public void removeTraceEventClass(java.lang.String name)
null or is not registered, this method does nothing.removeTraceEventClass in interface RASIMaskChangeGeneratorname - The event class name.public java.util.Enumeration getTraceEventClasses()
getTraceEventClasses in interface RASIMaskChangeGeneratorEnumeration of RAS event class names. If
no event classes are registered, the Enumeration
is empty.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.