Class WsHandler
- java.lang.Object
-
- com.ibm.websphere.ras.WsHandler
-
- All Implemented Interfaces:
- RASIHandler, RASIMaskChangeGenerator, RASIObject, java.io.Serializable
Deprecated.As of WAS 6.0, recommend using java.util.logging
public class WsHandler extends java.lang.Object implements RASIHandler
The purpose of this class is to serve as an opaque placeholder for the virtual WebSphere Handler object that each message and trace logger contain by default. It is documented that users are not allowed to call methods on this Handler.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.
- See Also:
- Serialized Form
-
-
Method Summary
Methods 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 aRASIMaskChangeListener
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 allRASIMaskChangeListener
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 anEnumeration
over the list ofRASIFormatters
maintained by thisRASIHandlers
.java.lang.String
getGroup()
Deprecated.Get the name of theRASManager
group with which this object is associated.java.util.Enumeration
getMaskChangeListeners()
Deprecated.Return an enumeration over the list ofRASIMaskChangeListener
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 ofRASIEvents
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 ofRASIEvents
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 specifiedRASIMaskChangeListener
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 ofRASIEvents
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.
-
-
-
Method Detail
-
getConfig
public java.util.Hashtable getConfig()
Deprecated.The getConfig method required by the RASIObject interface.WebSphere Handlers do not support Hashtable-based configuration methods.
- Specified by:
getConfig
in interfaceRASIHandler
- Specified by:
getConfig
in interfaceRASIMaskChangeGenerator
- Specified by:
getConfig
in interfaceRASIObject
- Returns:
- null.
-
setConfig
public void setConfig(java.util.Hashtable ht)
Deprecated.The setConfig method required by the RASIObject interface.WebSphere Handlers do not support Hashtable-based configuration methods. This method is a no-operation.
- Specified by:
setConfig
in interfaceRASIHandler
- Specified by:
setConfig
in interfaceRASIMaskChangeGenerator
- Specified by:
setConfig
in interfaceRASIObject
- Parameters:
ht
- a Hashtable or null. Input is ignored.
-
getName
public java.lang.String getName()
Deprecated.Return the name by which this object is known.- Specified by:
getName
in interfaceRASIObject
- Returns:
- null is always returned.
-
setName
public void setName(java.lang.String name)
Deprecated.Set the name by which this object is known.This method is a no operation.
- Specified by:
setName
in interfaceRASIObject
- Parameters:
name
- The name of this object. Input is ignored.
-
getDescription
public java.lang.String getDescription()
Deprecated.Get the description of this object.- Specified by:
getDescription
in interfaceRASIObject
- Returns:
- null is always returned.
-
setDescription
public void setDescription(java.lang.String desc)
Deprecated.Set the description of this object.This method is a no-operation.
- Specified by:
setDescription
in interfaceRASIObject
- Parameters:
desc
- The description of this object.
-
getGroup
public java.lang.String getGroup()
Deprecated.Get the name of theRASManager
group with which this object is associated. (This method is only used by the RAS Manager.)- Specified by:
getGroup
in interfaceRASIObject
- Returns:
- null is always returned.
-
getMessageMask
public long getMessageMask()
Deprecated.Return the current state of the message mask for this Handler.- Specified by:
getMessageMask
in interfaceRASIMaskChangeGenerator
- Returns:
- 0.
-
setMessageMask
public void setMessageMask(long mask)
Deprecated.Set the state of the message mask for this Handler to the specified value.The WebSphere Handler ignores this operation.
- Specified by:
setMessageMask
in interfaceRASIMaskChangeGenerator
- Parameters:
mask
- This value is ignored.
-
getTraceMask
public long getTraceMask()
Deprecated.Return the current state of the trace mask for this Handler.- Specified by:
getTraceMask
in interfaceRASIMaskChangeGenerator
- Returns:
- 0
-
setTraceMask
public void setTraceMask(long mask)
Deprecated.Set the state of the trace mask for this Handler.The WebSphere Handler ignores this operation.
- Specified by:
setTraceMask
in interfaceRASIMaskChangeGenerator
- Parameters:
mask
- This value is ignored.
-
addMaskChangeListener
public void addMaskChangeListener(RASIMaskChangeListener listener)
Deprecated.Add aRASIMaskChangeListener
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.
- Specified by:
addMaskChangeListener
in interfaceRASIMaskChangeGenerator
- Parameters:
listener
- The listener as specified by the caller. May be null
-
removeMaskChangeListener
public void removeMaskChangeListener(RASIMaskChangeListener listener)
Deprecated.Remove the specifiedRASIMaskChangeListener
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.
- Specified by:
removeMaskChangeListener
in interfaceRASIMaskChangeGenerator
- Parameters:
listener
- the listener as specified by the caller. May be null
-
getMaskChangeListeners
public java.util.Enumeration getMaskChangeListeners()
Deprecated.Return an enumeration over the list ofRASIMaskChangeListener
objects that have registered to be notified when either the trace or message mask for this object changes state.- Specified by:
getMaskChangeListeners
in interfaceRASIMaskChangeGenerator
- Returns:
- an empty enumeration.
-
fireMaskChangedEvent
public void fireMaskChangedEvent(RASMaskChangeEvent mc)
Deprecated.Inform allRASIMaskChangeListener
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.
- Specified by:
fireMaskChangedEvent
in interfaceRASIMaskChangeGenerator
- Parameters:
mc
- A mask change event, indicating what has changed.
-
addMessageEventClass
public void addMessageEventClass(java.lang.String name)
Deprecated.Add the name of a message event class which this object uses.This method is a no-operation.
- Specified by:
addMessageEventClass
in interfaceRASIMaskChangeGenerator
- Parameters:
name
- The event class name.
-
removeMessageEventClass
public void removeMessageEventClass(java.lang.String name)
Deprecated.Remove the name of a message event class from the list of classes which this object uses.This method is a no-operation.
- Specified by:
removeMessageEventClass
in interfaceRASIMaskChangeGenerator
- Parameters:
name
- The event class name.
-
getMessageEventClasses
public java.util.Enumeration getMessageEventClasses()
Deprecated.Return an Enumeration over the list of MessageEvent classes this object uses.- Specified by:
getMessageEventClasses
in interfaceRASIMaskChangeGenerator
- Returns:
- an empty Enumeration.
-
addTraceEventClass
public void addTraceEventClass(java.lang.String name)
Deprecated.Add the name of a trace event class which this object uses.This method is a no operation.
- Specified by:
addTraceEventClass
in interfaceRASIMaskChangeGenerator
- Parameters:
name
- The event class name.
-
removeTraceEventClass
public void removeTraceEventClass(java.lang.String name)
Deprecated.Remove the name of a trace event class from the list of classes which this object uses.This method is a no operation.
- Specified by:
removeTraceEventClass
in interfaceRASIMaskChangeGenerator
- Parameters:
name
- The event class name.
-
getTraceEventClasses
public java.util.Enumeration getTraceEventClasses()
Deprecated.Return an Enumeration over the list of MessageEvent classes this object uses.Since this Handler does not support trace events, an empty Enumeration is always returned.
- Specified by:
getTraceEventClasses
in interfaceRASIMaskChangeGenerator
- Returns:
- an empty Enumeration.
-
getMaximumQueueSize
public int getMaximumQueueSize()
Deprecated.Return the maximum number ofRASIEvents
which this Handler will cache.- Specified by:
getMaximumQueueSize
in interfaceRASIHandler
- Returns:
- 0
-
setMaximumQueueSize
public void setMaximumQueueSize(int size) throws java.lang.IllegalStateException
Deprecated.Set the maximum number ofRASIEvents
which this handler will hold.This operation is ignored.
- Specified by:
setMaximumQueueSize
in interfaceRASIHandler
- Parameters:
size
- The maximum queue size.- Throws:
java.lang.IllegalStateException
- is required on the method signature. However, this exception is never thrown by the implementation.
-
getRetryInterval
public int getRetryInterval()
Deprecated.Get the amount of time (in milliseconds) that this handler will wait before retrying a failed write.- Specified by:
getRetryInterval
in interfaceRASIHandler
- Returns:
- 0
-
setRetryInterval
public void setRetryInterval(int interval)
Deprecated.Set the amount of time (in milliseconds) that this handler will wait before retrying a failed write.This method is a no-operation.
- Specified by:
setRetryInterval
in interfaceRASIHandler
- Parameters:
interval
- the new value for the retry interval
-
getQueueSize
public int getQueueSize()
Deprecated.Get the current number ofRASIEvents
in this handler's queue.- Specified by:
getQueueSize
in interfaceRASIHandler
- Returns:
- 0
-
addFormatter
public void addFormatter(RASIFormatter formatter)
Deprecated.Registers a RAS event formatter with this handler.This method is a no-operations
- Specified by:
addFormatter
in interfaceRASIHandler
- Parameters:
formatter
- The event formatter. May be null.
-
removeFormatter
public void removeFormatter(RASIFormatter formatter)
Deprecated.Remove the specified RAS event formatter from the list of formatters maintained by this handler.This method is a no operation.
- Specified by:
removeFormatter
in interfaceRASIHandler
- Parameters:
formatter
- The event formatter. May be null.
-
getFormatters
public java.util.Enumeration getFormatters()
Deprecated.Return anEnumeration
over the list ofRASIFormatters
maintained by thisRASIHandlers
.- Specified by:
getFormatters
in interfaceRASIHandler
- Returns:
- an empty enumeration.
-
openDevice
public void openDevice()
Deprecated.Open the device to which the handler will send its log entries.This method is a no-operation.
- Specified by:
openDevice
in interfaceRASIHandler
-
closeDevice
public void closeDevice()
Deprecated.Close the device to which the handler is sending its log entries, if it is open.This method is a no-operation.
- Specified by:
closeDevice
in interfaceRASIHandler
-
stop
public void stop()
Deprecated.Stop the handler.This method is a no-operation.
- Specified by:
stop
in interfaceRASIHandler
-
logEvent
public void logEvent(RASIEvent event)
Deprecated.Pass a RAS event to the Handler to log in an asynchronous manner, if the Handler supports asynchronous logging.This method is a no-operation.
- Specified by:
logEvent
in interfaceRASIHandler
- Parameters:
event
- A RAS event whose message type is currently being processed by this Handler. Null is tolerated.
-
writeEvent
public void writeEvent(RASIEvent event)
Deprecated.Pass a RAS event to the Handler to log in a synchronous manner.This method is a no-operation.
- Specified by:
writeEvent
in interfaceRASIHandler
- Parameters:
event
- A RAS event whose message type is currently being processed by this Handler. Null is tolerated.
-
-