com.ibm.websphere.ras

Class WsHandler

  1. java.lang.Object
  2. extended bycom.ibm.websphere.ras.WsHandler
All implemented interfaces:
RASIHandler, RASIMaskChangeGenerator, RASIObject, java.io.Serializable

Deprecated. As of WAS 6.0, recommend using java.util.logging
  1. public class WsHandler
  2. extends java.lang.Object
  3. 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

Modifier and Type Method and Description
  1. void
addFormatter(RASIFormatter formatter)
Deprecated. Registers a RAS event formatter with this handler.
  1. 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.
  1. void
addMessageEventClass(java.lang.String name)
Deprecated. Add the name of a message event class which this object uses.
  1. void
addTraceEventClass(java.lang.String name)
Deprecated. Add the name of a trace event class which this object uses.
  1. void
closeDevice()
Deprecated. Close the device to which the handler is sending its log entries, if it is open.
  1. 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.
  1. java.util.Hashtable
getConfig()
Deprecated. The getConfig method required by the RASIObject interface.
  1. java.lang.String
getDescription()
Deprecated. Get the description of this object.
  1. java.util.Enumeration
getFormatters()
Deprecated. Return an Enumeration over the list of RASIFormatters maintained by this RASIHandlers.
  1. java.lang.String
getGroup()
Deprecated. Get the name of the RASManager group with which this object is associated.
  1. 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.
  1. int
getMaximumQueueSize()
Deprecated. Return the maximum number of RASIEvents which this Handler will cache.
  1. java.util.Enumeration
getMessageEventClasses()
Deprecated. Return an Enumeration over the list of MessageEvent classes this object uses.
  1. long
getMessageMask()
Deprecated. Return the current state of the message mask for this Handler.
  1. java.lang.String
getName()
Deprecated. Return the name by which this object is known.
  1. int
getQueueSize()
Deprecated. Get the current number of RASIEvents in this handler's queue.
  1. int
getRetryInterval()
Deprecated. Get the amount of time (in milliseconds) that this handler will wait before retrying a failed write.
  1. java.util.Enumeration
getTraceEventClasses()
Deprecated. Return an Enumeration over the list of MessageEvent classes this object uses.
  1. long
getTraceMask()
Deprecated. Return the current state of the trace mask for this Handler.
  1. void
logEvent(RASIEvent event)
Deprecated. Pass a RAS event to the Handler to log in an asynchronous manner, if the Handler supports asynchronous logging.
  1. void
openDevice()
Deprecated. Open the device to which the handler will send its log entries.
  1. void
removeFormatter(RASIFormatter formatter)
Deprecated. Remove the specified RAS event formatter from the list of formatters maintained by this handler.
  1. 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.
  1. void
removeMessageEventClass(java.lang.String name)
Deprecated. Remove the name of a message event class from the list of classes which this object uses.
  1. void
removeTraceEventClass(java.lang.String name)
Deprecated. Remove the name of a trace event class from the list of classes which this object uses.
  1. void
setConfig(java.util.Hashtable ht)
Deprecated. The setConfig method required by the RASIObject interface.
  1. void
setDescription(java.lang.String desc)
Deprecated. Set the description of this object.
  1. void
setMaximumQueueSize(int size)
Deprecated. Set the maximum number of RASIEvents which this handler will hold.
  1. void
setMessageMask(long mask)
Deprecated. Set the state of the message mask for this Handler to the specified value.
  1. void
setName(java.lang.String name)
Deprecated. Set the name by which this object is known.
  1. void
setRetryInterval(int interval)
Deprecated. Set the amount of time (in milliseconds) that this handler will wait before retrying a failed write.
  1. void
setTraceMask(long mask)
Deprecated. Set the state of the trace mask for this Handler.
  1. void
stop()
Deprecated. Stop the handler.
  1. void
writeEvent(RASIEvent event)
Deprecated. Pass a RAS event to the Handler to log in a synchronous manner.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getConfig

  1. 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 interface RASIHandler
Specified by:
Specified by:
getConfig in interface RASIObject
Returns:
null.

setConfig

  1. 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 interface RASIHandler
Specified by:
Specified by:
setConfig in interface RASIObject
Parameters:
ht - a Hashtable or null. Input is ignored.

getName

  1. public java.lang.String getName( )
Deprecated.
Return the name by which this object is known.

Specified by:
getName in interface RASIObject
Returns:
null is always returned.

setName

  1. 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 interface RASIObject
Parameters:
name - The name of this object. Input is ignored.

getDescription

  1. public java.lang.String getDescription( )
Deprecated.
Get the description of this object.

Specified by:
getDescription in interface RASIObject
Returns:
null is always returned.

setDescription

  1. public void setDescription(java.lang.String desc)
Deprecated.
Set the description of this object.

This method is a no-operation.

Specified by:
setDescription in interface RASIObject
Parameters:
desc - The description of this object.

getGroup

  1. public java.lang.String getGroup( )
Deprecated.
Get the name of the RASManager group with which this object is associated. (This method is only used by the RAS Manager.)

Specified by:
getGroup in interface RASIObject
Returns:
null is always returned.

getMessageMask

  1. public long getMessageMask()
Deprecated.
Return the current state of the message mask for this Handler.

Specified by:
Returns:
0.

setMessageMask

  1. 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:
Parameters:
mask - This value is ignored.

getTraceMask

  1. public long getTraceMask()
Deprecated.
Return the current state of the trace mask for this Handler.

Specified by:
Returns:
0

setTraceMask

  1. public void setTraceMask(long mask)
Deprecated.
Set the state of the trace mask for this Handler.

The WebSphere Handler ignores this operation.

Specified by:
Parameters:
mask - This value is ignored.

addMaskChangeListener

  1. public 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.

This operation is ignored.

Specified by:
Parameters:
listener - The listener as specified by the caller. May be null

removeMaskChangeListener

  1. public 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.

This operation is ignored.

Specified by:
Parameters:
listener - the listener as specified by the caller. May be null

getMaskChangeListeners

  1. public 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.

Specified by:
Returns:
an empty enumeration.

fireMaskChangedEvent

  1. public 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.

This operation is ignored.

Specified by:
Parameters:
mc - A mask change event, indicating what has changed.

addMessageEventClass

  1. 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:
Parameters:
name - The event class name.

removeMessageEventClass

  1. 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:
Parameters:
name - The event class name.

getMessageEventClasses

  1. public java.util.Enumeration getMessageEventClasses( )
Deprecated.
Return an Enumeration over the list of MessageEvent classes this object uses.

Specified by:
Returns:
an empty Enumeration.

addTraceEventClass

  1. 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:
Parameters:
name - The event class name.

removeTraceEventClass

  1. 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:
Parameters:
name - The event class name.

getTraceEventClasses

  1. 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:
Returns:
an empty Enumeration.

getMaximumQueueSize

  1. public int getMaximumQueueSize( )
Deprecated.
Return the maximum number of RASIEvents which this Handler will cache.

Specified by:
Returns:
0

setMaximumQueueSize

  1. public void setMaximumQueueSize( int size)
  2. throws java.lang.IllegalStateException
Deprecated.
Set the maximum number of RASIEvents which this handler will hold.

This operation is ignored.

Specified by:
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

  1. public int getRetryInterval()
Deprecated.
Get the amount of time (in milliseconds) that this handler will wait before retrying a failed write.

Specified by:
Returns:
0

setRetryInterval

  1. 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:
Parameters:
interval - the new value for the retry interval

getQueueSize

  1. public int getQueueSize()
Deprecated.
Get the current number of RASIEvents in this handler's queue.

Specified by:
getQueueSize in interface RASIHandler
Returns:
0

addFormatter

  1. public void addFormatter(RASIFormatter formatter)
Deprecated.
Registers a RAS event formatter with this handler.

This method is a no-operations

Specified by:
addFormatter in interface RASIHandler
Parameters:
formatter - The event formatter. May be null.

removeFormatter

  1. 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:
Parameters:
formatter - The event formatter. May be null.

getFormatters

  1. public java.util.Enumeration getFormatters( )
Deprecated.
Return an Enumeration over the list of RASIFormatters maintained by this RASIHandlers.

Specified by:
getFormatters in interface RASIHandler
Returns:
an empty enumeration.

openDevice

  1. 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 interface RASIHandler

closeDevice

  1. 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 interface RASIHandler

stop

  1. public void stop()
Deprecated.
Stop the handler.

This method is a no-operation.

Specified by:
stop in interface RASIHandler

logEvent

  1. 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 interface RASIHandler
Parameters:
event - A RAS event whose message type is currently being processed by this Handler. Null is tolerated.

writeEvent

  1. 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 interface RASIHandler
Parameters:
event - A RAS event whose message type is currently being processed by this Handler. Null is tolerated.