public class WsHandler extends java.lang.Object implements RASIHandler
When a message or trace logger is retrieved from the Manager class, by default a WebSphere Handler is installed in the logger. For efficiency purposes as well as security, we do not install a real Handler. Instead the logger calls the native ras subsystem as appropriate.
We do allow customers to get a reference to this Handler and remove it if they so desire. Once removed the handler cannot be reinserted. We track this in the logger classes themselves. When the user calls getAllHandlers() on a logger, we add a reference to this opaque object to the returned Hashtable. When the user removes a Handler, we sample the class of the handler and if it is of this class, we set the boolean to indicate the Handler has been removed. For subsequent calls to getAllHandlers, we will not add a reference to the returned Hashtable.
| Modifier and Type | Method and Description |
|---|---|
void |
addFormatter(RASIFormatter formatter)
Deprecated.
Registers a RAS event formatter with this handler.
|
void |
addMaskChangeListener(RASIMaskChangeListener listener)
Deprecated.
Add a
RASIMaskChangeListener object to the list of listeners
that wish to be notified when either the trace or message mask for this
Handler object changes state. |
void |
addMessageEventClass(java.lang.String name)
Deprecated.
Add the name of a message event class which this object uses.
|
void |
addTraceEventClass(java.lang.String name)
Deprecated.
Add the name of a trace event class which this object uses.
|
void |
closeDevice()
Deprecated.
Close the device to which the handler is sending its log entries, if it is open.
|
void |
fireMaskChangedEvent(RASMaskChangeEvent mc)
Deprecated.
Inform all
RASIMaskChangeListener objects that have
registered to be notified when either the trace or message mask for
this object changes state that such a state change has occurred. |
java.util.Hashtable |
getConfig()
Deprecated.
The getConfig method required by the RASIObject interface.
|
java.lang.String |
getDescription()
Deprecated.
Get the description of this object.
|
java.util.Enumeration |
getFormatters()
Deprecated.
Return an
Enumeration over the list of RASIFormatters
maintained by this RASIHandlers. |
java.lang.String |
getGroup()
Deprecated.
Get the name of the
RASManager
group with which this object is associated. |
java.util.Enumeration |
getMaskChangeListeners()
Deprecated.
Return an enumeration over the list of
RASIMaskChangeListener
objects that have registered to be notified when either the trace or message
mask for this object changes state. |
int |
getMaximumQueueSize()
Deprecated.
Return the maximum number of
RASIEvents which this
Handler will cache. |
java.util.Enumeration |
getMessageEventClasses()
Deprecated.
Return an Enumeration over the list of MessageEvent classes this object uses.
|
long |
getMessageMask()
Deprecated.
Return the current state of the message mask for this Handler.
|
java.lang.String |
getName()
Deprecated.
Return the name by which this object is known.
|
int |
getQueueSize()
Deprecated.
Get the current number of
RASIEvents in this handler's queue. |
int |
getRetryInterval()
Deprecated.
Get the amount of time (in milliseconds) that this handler will wait
before retrying a failed write.
|
java.util.Enumeration |
getTraceEventClasses()
Deprecated.
Return an Enumeration over the list of MessageEvent classes this object uses.
|
long |
getTraceMask()
Deprecated.
Return the current state of the trace mask for this Handler.
|
void |
logEvent(RASIEvent event)
Deprecated.
Pass a RAS event to the Handler to log in an asynchronous manner, if the
Handler supports asynchronous logging.
|
void |
openDevice()
Deprecated.
Open the device to which the handler will send its log entries.
|
void |
removeFormatter(RASIFormatter formatter)
Deprecated.
Remove the specified RAS event formatter from the list of formatters
maintained by this handler.
|
void |
removeMaskChangeListener(RASIMaskChangeListener listener)
Deprecated.
Remove the specified
RASIMaskChangeListener object from the list
of listeners that wish to be notified when either the trace or message mask
for this Handler object changes state. |
void |
removeMessageEventClass(java.lang.String name)
Deprecated.
Remove the name of a message event class from the list of classes which
this object uses.
|
void |
removeTraceEventClass(java.lang.String name)
Deprecated.
Remove the name of a trace event class from the list of classes which
this object uses.
|
void |
setConfig(java.util.Hashtable ht)
Deprecated.
The setConfig method required by the RASIObject interface.
|
void |
setDescription(java.lang.String desc)
Deprecated.
Set the description of this object.
|
void |
setMaximumQueueSize(int size)
Deprecated.
Set the maximum number of
RASIEvents which this handler
will hold. |
void |
setMessageMask(long mask)
Deprecated.
Set the state of the message mask for this Handler to the specified value.
|
void |
setName(java.lang.String name)
Deprecated.
Set the name by which this object is known.
|
void |
setRetryInterval(int interval)
Deprecated.
Set the amount of time (in milliseconds) that this handler will wait
before retrying a failed write.
|
void |
setTraceMask(long mask)
Deprecated.
Set the state of the trace mask for this Handler.
|
void |
stop()
Deprecated.
Stop the handler.
|
void |
writeEvent(RASIEvent event)
Deprecated.
Pass a RAS event to the Handler to log in a synchronous manner.
|
public java.util.Hashtable getConfig()
WebSphere Handlers do not support Hashtable-based configuration methods.
getConfig in interface RASIHandlergetConfig in interface RASIMaskChangeGeneratorgetConfig in interface RASIObjectpublic void setConfig(java.util.Hashtable ht)
WebSphere Handlers do not support Hashtable-based configuration methods. This method is a no-operation.
setConfig in interface RASIHandlersetConfig in interface RASIMaskChangeGeneratorsetConfig in interface RASIObjectht - a Hashtable or null. Input is ignored.public java.lang.String getName()
getName in interface RASIObjectpublic void setName(java.lang.String name)
This method is a no operation.
setName in interface RASIObjectname - The name of this object. Input is ignored.public java.lang.String getDescription()
getDescription in interface RASIObjectpublic void setDescription(java.lang.String desc)
This method is a no-operation.
setDescription in interface RASIObjectdesc - The description of this object.public java.lang.String getGroup()
RASManager
group with which this object is associated. (This method is only used
by the RAS Manager.)
getGroup in interface RASIObjectpublic long getMessageMask()
getMessageMask in interface RASIMaskChangeGeneratorpublic void setMessageMask(long mask)
The WebSphere Handler ignores this operation.
setMessageMask in interface RASIMaskChangeGeneratormask - This value is ignored.public long getTraceMask()
getTraceMask in interface RASIMaskChangeGeneratorpublic void setTraceMask(long mask)
The WebSphere Handler ignores this operation.
setTraceMask in interface RASIMaskChangeGeneratormask - This value is ignored.public void addMaskChangeListener(RASIMaskChangeListener listener)
RASIMaskChangeListener object to the list of listeners
that wish to be notified when either the trace or message mask for this
Handler object changes state.
This operation is ignored.
addMaskChangeListener in interface RASIMaskChangeGeneratorlistener - The listener as specified by the caller. May be nullpublic void removeMaskChangeListener(RASIMaskChangeListener listener)
RASIMaskChangeListener object from the list
of listeners that wish to be notified when either the trace or message mask
for this Handler object changes state.
This operation is ignored.
removeMaskChangeListener in interface RASIMaskChangeGeneratorlistener - the listener as specified by the caller. May be nullpublic java.util.Enumeration getMaskChangeListeners()
RASIMaskChangeListener
objects that have registered to be notified when either the trace or message
mask for this object changes state.
getMaskChangeListeners in interface RASIMaskChangeGeneratorpublic void fireMaskChangedEvent(RASMaskChangeEvent mc)
RASIMaskChangeListener objects that have
registered to be notified when either the trace or message mask for
this object changes state that such a state change has occurred.
This operation is ignored.
fireMaskChangedEvent in interface RASIMaskChangeGeneratormc - A mask change event, indicating what has changed.public void addMessageEventClass(java.lang.String name)
This method is a no-operation.
addMessageEventClass in interface RASIMaskChangeGeneratorname - The event class name.public void removeMessageEventClass(java.lang.String name)
This method is a no-operation.
removeMessageEventClass in interface RASIMaskChangeGeneratorname - The event class name.public java.util.Enumeration getMessageEventClasses()
getMessageEventClasses in interface RASIMaskChangeGeneratorpublic void addTraceEventClass(java.lang.String name)
This method is a no operation.
addTraceEventClass in interface RASIMaskChangeGeneratorname - The event class name.public void removeTraceEventClass(java.lang.String name)
This method is a no operation.
removeTraceEventClass in interface RASIMaskChangeGeneratorname - The event class name.public java.util.Enumeration getTraceEventClasses()
Since this Handler does not support trace events, an empty Enumeration is always returned.
getTraceEventClasses in interface RASIMaskChangeGeneratorpublic int getMaximumQueueSize()
RASIEvents which this
Handler will cache.
getMaximumQueueSize in interface RASIHandlerpublic void setMaximumQueueSize(int size)
throws java.lang.IllegalStateException
RASIEvents which this handler
will hold.
This operation is ignored.
setMaximumQueueSize in interface RASIHandlersize - The maximum queue size.java.lang.IllegalStateException - is required on the method signature. However,
this exception is never thrown by the implementation.public int getRetryInterval()
getRetryInterval in interface RASIHandlerpublic void setRetryInterval(int interval)
This method is a no-operation.
setRetryInterval in interface RASIHandlerinterval - the new value for the retry intervalpublic int getQueueSize()
RASIEvents in this handler's queue.
getQueueSize in interface RASIHandlerpublic void addFormatter(RASIFormatter formatter)
This method is a no-operations
addFormatter in interface RASIHandlerformatter - The event formatter. May be null.public void removeFormatter(RASIFormatter formatter)
This method is a no operation.
removeFormatter in interface RASIHandlerformatter - The event formatter. May be null.public java.util.Enumeration getFormatters()
Enumeration over the list of RASIFormatters
maintained by this RASIHandlers.
getFormatters in interface RASIHandlerpublic void openDevice()
This method is a no-operation.
openDevice in interface RASIHandlerpublic void closeDevice()
This method is a no-operation.
closeDevice in interface RASIHandlerpublic void stop()
This method is a no-operation.
stop in interface RASIHandlerpublic void logEvent(RASIEvent event)
This method is a no-operation.
logEvent in interface RASIHandlerevent - A RAS event whose message type is currently being processed
by this Handler. Null is tolerated.public void writeEvent(RASIEvent event)
This method is a no-operation.
writeEvent in interface RASIHandlerevent - A RAS event whose message type is currently being processed
by this Handler. Null is tolerated.