public class RASGroup extends RASObject implements java.lang.Cloneable, RASConstants
RASGroup
organizes the configuration data for a related
set of RAS objects (loggers, handlers and formatters). An application
will typically group all of its RAS objects in a RAS group,
or set of RAS groups, to distinguish them from other RAS objects
controlled by the RASManager
. Data grouped in this
manner can be used by a graphical program to display RAS information
application-by-application.
A RAS group contains collections of the following items:
RASIMessageLogger
configurations
RASITraceLogger
configurations
RASIHandler
configurations
RASIFormatter
configurations
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 |
---|
RASGroup(java.lang.String name)
Deprecated.
Creates a
RASGroup . |
RASGroup(java.lang.String name,
java.lang.String desc)
Deprecated.
Creates a
RASGroup . |
Modifier and Type | Method and Description |
---|---|
void |
addFormatterConfig(RASConfig cfg)
Deprecated.
Adds a formatter configuration to this group.
|
void |
addHandlerConfig(RASConfig cfg)
Deprecated.
Adds a handler configuration to this group.
|
void |
addMessageLoggerConfig(RASConfig cfg)
Deprecated.
Adds a message logger configuration to this group.
|
void |
addTraceLoggerConfig(RASConfig cfg)
Deprecated.
Adds a trace logger configuration to this group.
|
java.lang.Object |
clone()
Deprecated.
Creates a new
RASGroup . |
RASConfig |
getFormatterConfig(java.lang.String name)
Deprecated.
Gets a formatter configuration from this group.
|
java.util.Hashtable |
getFormatterConfigs()
Deprecated.
Gets all of the formatter configurations associated with this group.
|
RASConfig |
getHandlerConfig(java.lang.String name)
Deprecated.
Gets a handler configuration from this group.
|
java.util.Hashtable |
getHandlerConfigs()
Deprecated.
Gets all of the handler configurations associated with this group.
|
RASConfig |
getMessageLoggerConfig(java.lang.String name)
Deprecated.
Gets a message logger configuration from this group.
|
java.util.Hashtable |
getMessageLoggerConfigs()
Deprecated.
Gets all of the message Logger configurations associated with this group.
|
RASConfig |
getTraceLoggerConfig(java.lang.String name)
Deprecated.
Gets a trace logger configuration from this group.
|
java.util.Hashtable |
getTraceLoggerConfigs()
Deprecated.
Gets all of the trace logger configurations associated with this group.
|
boolean |
isModified()
Deprecated.
Determines if the group has been modified.
|
void |
removeFormatterConfig(java.lang.String name)
Deprecated.
Removes a formatter configuration from this group.
|
void |
removeHandlerConfig(java.lang.String name)
Deprecated.
Removes a handler configuration from this group.
|
void |
removeMessageLoggerConfig(java.lang.String name)
Deprecated.
Removes a message logger configuration from this group.
|
void |
removeTraceLoggerConfig(java.lang.String name)
Deprecated.
Removes a trace logger configuration from this group.
|
void |
setModified(boolean flag)
Deprecated.
Sets a flag that indicates that the contents of this group has been
modified.
|
java.lang.String |
toString()
Deprecated.
Returns a
String representation of this object. |
protected void |
updateActiveObjects(RASGroup oldGroup,
RASManager mgr)
Deprecated.
Scans an "old"
RASGroup for RAS objects which have been
instantiated and updates this group with this information. |
getConfig, getDescription, getGroup, getName, init, setConfig, setDescription, setName
public RASGroup(java.lang.String name)
RASGroup
. The description
of this object is an empty string.name
- The name of this object.public RASGroup(java.lang.String name, java.lang.String desc)
RASGroup
.name
- The name of this object.desc
- The description of this object.public java.lang.Object clone()
RASGroup
.public void addMessageLoggerConfig(RASConfig cfg)
cfg
- A RASConfig
containing the logger
configuration.public void removeMessageLoggerConfig(java.lang.String name)
name
- The name of the logger configuration.public RASConfig getMessageLoggerConfig(java.lang.String name)
name
- The name of the logger configuration.null
if
the named configuration does not exist.public java.util.Hashtable getMessageLoggerConfigs()
Hashtable
of RASConfig
objects.public void addTraceLoggerConfig(RASConfig cfg)
cfg
- A RASConfig
containing the logger
configuration.public void removeTraceLoggerConfig(java.lang.String name)
name
- The name of the logger configuration.public RASConfig getTraceLoggerConfig(java.lang.String name)
name
- The name of the logger configuration.null
if
the named configuration does not exist.public java.util.Hashtable getTraceLoggerConfigs()
Hashtable
of RASConfig
objects.public void addHandlerConfig(RASConfig cfg)
cfg
- A RASConfig
containing the handler
configuration.public void removeHandlerConfig(java.lang.String name)
name
- The name of the handler configuration.public RASConfig getHandlerConfig(java.lang.String name)
name
- The name of the handler configuration.null
if
the named configuration does not exist.public java.util.Hashtable getHandlerConfigs()
Hashtable
of RASConfig
objects.public void addFormatterConfig(RASConfig cfg)
cfg
- A RASConfig
containing the formatter
configuration.public void removeFormatterConfig(java.lang.String name)
name
- The name of the formatter configuration.public RASConfig getFormatterConfig(java.lang.String name)
name
- The name of the formatter configuration.null
if
the named configuration does not exist.public java.util.Hashtable getFormatterConfigs()
Hashtable
of RASConfig
objects.protected void updateActiveObjects(RASGroup oldGroup, RASManager mgr)
RASGroup
for RAS objects which have been
instantiated and updates this group with this information. This
method should be called if a RAS configuration is refreshed from a
data store, so that the active-object data is not lost. This method
does nothing if the "old" group is null
.oldgroup
- The RASGroup
to be scanned for
instantiated objects.mgr
- The RASManager
.public void setModified(boolean flag)
flag
- true
when the group has been modified and
false
otherwise.public boolean isModified()
true
when the group has been modified and
false
otherwise.public java.lang.String toString()
String
representation of this object.toString
in class java.lang.Object