public interface RASIHandler extends RASIMaskChangeGenerator
Modifier and Type | Method and Description |
---|---|
void |
addFormatter(RASIFormatter formatter)
Deprecated.
Registers a RAS event formatter with this handler.
|
void |
closeDevice()
Deprecated.
Closes the device to which the handler is sending its log entries, if
it is open.
|
java.util.Hashtable |
getConfig()
Deprecated.
Gets the configuration of this object.
|
java.util.Enumeration |
getFormatters()
Deprecated.
Gets the set of formatters associated with this handler.
|
int |
getMaximumQueueSize()
Deprecated.
Gets the maximum number of
RASIEvents which the
handler will hold. |
int |
getQueueSize()
Deprecated.
Gets the current number of
RASIEvents in the handler's
queue. |
int |
getRetryInterval()
Deprecated.
Gets the amount of time (in milliseconds) that this handler will wait
before retrying a failed write.
|
void |
logEvent(RASIEvent event)
Deprecated.
Passes a RAS event asynchronously from a logger to a handler.
|
void |
openDevice()
Deprecated.
Opens the device to which the handler will send its log entries.
|
void |
removeFormatter(RASIFormatter formatter)
Deprecated.
Removes a RAS event formatter from this handler.
|
void |
setConfig(java.util.Hashtable ht)
Deprecated.
Sets the configuration of this object.
|
void |
setMaximumQueueSize(int size)
Deprecated.
Sets the maximum number of
RASIEvents which the handler
will hold. |
void |
setRetryInterval(int interval)
Deprecated.
Sets the amount of time (in milliseconds) that this handler will wait
before retrying a failed write.
|
void |
stop()
Deprecated.
Stops the handler.
|
void |
writeEvent(RASIEvent event)
Deprecated.
Passes a RAS event synchronously from a logger to a handler.
|
addMaskChangeListener, addMessageEventClass, addTraceEventClass, fireMaskChangedEvent, getMaskChangeListeners, getMessageEventClasses, getMessageMask, getTraceEventClasses, getTraceMask, removeMaskChangeListener, removeMessageEventClass, removeTraceEventClass, setMessageMask, setTraceMask
getDescription, getGroup, getName, setDescription, setName
java.util.Hashtable getConfig()
getConfig
in interface RASIMaskChangeGenerator
getConfig
in interface RASIObject
Hashtable
containing the configuration.
This object inserts the following key/value pairs into the
the configuration:
RASIEvents
which
this handler will hold.
All values are Strings
.
Extensions to this object may add additional keys.
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 RASIMaskChangeGenerator
setConfig
in interface RASIObject
ht
- A Hashtable
containing the configuration.
This object searches for the following keys:
RASIEvents
which
this handler will hold.
All values are Strings
.
If a key is not found, an internal default for that element
is set instead.
Extensions to this object may add additional keys.
int getMaximumQueueSize()
RASIEvents
which the
handler will hold. If not set, the default value of 10,000 is returned.void setMaximumQueueSize(int size) throws java.lang.IllegalStateException
RASIEvents
which the handler
will hold. If this maximum is exceeded, objects which call
logEvent
will be throttled-back, until the queue has
enough space for the new object. If the size is set to zero, no
maximum is in effect. If the size is less than zero, the current
value is not changed.size
- The maximum queue size.java.lang.IllegalStateException
- This exception is thrown if any RAS events are on the queue when an
attempt is made to change the queue's size.int getRetryInterval()
void setRetryInterval(int interval)
interval
- The retry interval.int getQueueSize()
RASIEvents
in the handler's
queue.void addFormatter(RASIFormatter formatter)
RASIEvent
classes
which it supports before this method is called.
If the formatter is null
, this method does nothing.
If the formatter supports an event class which is already registered
with this handler, this new formatter replaces the old one.formatter
- The event formatter.void removeFormatter(RASIFormatter formatter)
null
or is not registered, this
method does nothing.formatter
- The event formatter.java.util.Enumeration getFormatters()
Enumeration
of registered formatters. If no
formatters have been registered, the Enumeration
is empty.void openDevice()
System.err
.
If the device is already open, it will be closed and then reopened.
void closeDevice()
void stop()
void logEvent(RASIEvent event)
null
,
this method does nothing.event
- A RAS event.void writeEvent(RASIEvent event)
format
method of the configured formatter and then the
println
method of the configured print writer.
The logger must compare the event type against the handler's message
or trace mask before calling this method. If the log event is
null
, this method does nothing.event
- A RAS event.