|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.websphere.ras.WsHandler
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.
Method Summary | |
---|---|
void |
addFormatter(RASIFormatter formatter)
Registers a RAS event formatter with this handler. |
void |
addMaskChangeListener(RASIMaskChangeListener listener)
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)
Add the name of a message event class which this object uses. |
void |
addTraceEventClass(java.lang.String name)
Add the name of a trace event class which this object uses. |
void |
closeDevice()
Close the device to which the handler is sending its log entries, if it is open. |
void |
fireMaskChangedEvent(RASMaskChangeEvent mc)
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()
The getConfig method required by the RASIObject interface. |
java.lang.String |
getDescription()
Get the description of this object. |
java.util.Enumeration |
getFormatters()
Return an Enumeration over the list of RASIFormatters
maintained by this RASIHandlers. |
java.lang.String |
getGroup()
Get the name of the RASManager group with which this object is associated. |
java.util.Enumeration |
getMaskChangeListeners()
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()
Return the maximum number of RASIEvents which this
Handler will cache. |
java.util.Enumeration |
getMessageEventClasses()
Return an Enumeration over the list of MessageEvent classes this object uses. |
long |
getMessageMask()
Return the current state of the message mask for this Handler. |
java.lang.String |
getName()
Return the name by which this object is known. |
int |
getQueueSize()
Get the current number of RASIEvents in this handler's queue. |
int |
getRetryInterval()
Get the amount of time (in milliseconds) that this handler will wait before retrying a failed write. |
java.util.Enumeration |
getTraceEventClasses()
Return an Enumeration over the list of MessageEvent classes this object uses. |
long |
getTraceMask()
Return the current state of the trace mask for this Handler. |
void |
logEvent(RASIEvent event)
Pass a RAS event to the Handler to log in an asynchronous manner, if the Handler supports asynchronous logging. |
void |
openDevice()
Open the device to which the handler will send its log entries. |
void |
removeFormatter(RASIFormatter formatter)
Remove the specified RAS event formatter from the list of formatters maintained by this handler. |
void |
removeMaskChangeListener(RASIMaskChangeListener listener)
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)
Remove the name of a message event class from the list of classes which this object uses. |
void |
removeTraceEventClass(java.lang.String name)
Remove the name of a trace event class from the list of classes which this object uses. |
void |
setConfig(java.util.Hashtable ht)
The setConfig method required by the RASIObject interface. |
void |
setDescription(java.lang.String desc)
Set the description of this object. |
void |
setMaximumQueueSize(int size)
Set the maximum number of RASIEvents which this handler
will hold. |
void |
setMessageMask(long mask)
Set the state of the message mask for this Handler to the specified value. |
void |
setName(java.lang.String name)
Set the name by which this object is known. |
void |
setRetryInterval(int interval)
Set the amount of time (in milliseconds) that this handler will wait before retrying a failed write. |
void |
setTraceMask(long mask)
Set the state of the trace mask for this Handler. |
void |
stop()
Stop the handler. |
void |
writeEvent(RASIEvent event)
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 |
public java.util.Hashtable getConfig()
WebSphere Handlers do not support Hashtable-based configuration methods.
getConfig
in interface RASIHandler
public void setConfig(java.util.Hashtable ht)
WebSphere Handlers do not support Hashtable-based configuration methods. This method is a no-operation.
setConfig
in interface RASIHandler
ht
- a Hashtable or null. Input is ignored.public java.lang.String getName()
getName
in interface RASIObject
public void setName(java.lang.String name)
This method is a no operation.
setName
in interface RASIObject
name
- The name of this object. Input is ignored.public java.lang.String getDescription()
getDescription
in interface RASIObject
public void setDescription(java.lang.String desc)
This method is a no-operation.
setDescription
in interface RASIObject
desc
- The description of this object.public java.lang.String getGroup()
getGroup
in interface RASIObject
public long getMessageMask()
getMessageMask
in interface RASIMaskChangeGenerator
public void setMessageMask(long mask)
The WebSphere Handler ignores this operation.
setMessageMask
in interface RASIMaskChangeGenerator
mask
- This value is ignored.public long getTraceMask()
getTraceMask
in interface RASIMaskChangeGenerator
public void setTraceMask(long mask)
The WebSphere Handler ignores this operation.
setTraceMask
in interface RASIMaskChangeGenerator
mask
- This value is ignored.public void addMaskChangeListener(RASIMaskChangeListener listener)
This operation is ignored.
addMaskChangeListener
in interface RASIMaskChangeGenerator
listener
- The listener as specified by the caller. May be nullpublic void removeMaskChangeListener(RASIMaskChangeListener listener)
This operation is ignored.
removeMaskChangeListener
in interface RASIMaskChangeGenerator
listener
- the listener as specified by the caller. May be nullpublic java.util.Enumeration getMaskChangeListeners()
getMaskChangeListeners
in interface RASIMaskChangeGenerator
public void fireMaskChangedEvent(RASMaskChangeEvent mc)
This operation is ignored.
fireMaskChangedEvent
in interface RASIMaskChangeGenerator
mc
- A mask change event, indicating what has changed.public void addMessageEventClass(java.lang.String name)
This method is a no-operation.
addMessageEventClass
in interface RASIMaskChangeGenerator
name
- The event class name.public void removeMessageEventClass(java.lang.String name)
This method is a no-operation.
removeMessageEventClass
in interface RASIMaskChangeGenerator
name
- The event class name.public java.util.Enumeration getMessageEventClasses()
getMessageEventClasses
in interface RASIMaskChangeGenerator
public void addTraceEventClass(java.lang.String name)
This method is a no operation.
addTraceEventClass
in interface RASIMaskChangeGenerator
name
- The event class name.public void removeTraceEventClass(java.lang.String name)
This method is a no operation.
removeTraceEventClass
in interface RASIMaskChangeGenerator
name
- 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 RASIMaskChangeGenerator
public int getMaximumQueueSize()
RASIEvents
which this
Handler will cache.
getMaximumQueueSize
in interface RASIHandler
public void setMaximumQueueSize(int size) throws java.lang.IllegalStateException
RASIEvents
which this handler
will hold.
This operation is ignored.
setMaximumQueueSize
in interface RASIHandler
size
- 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 RASIHandler
public void setRetryInterval(int interval)
This method is a no-operation.
setRetryInterval
in interface RASIHandler
interval
- the new value for the retry intervalpublic int getQueueSize()
RASIEvents
in this handler's queue.
getQueueSize
in interface RASIHandler
public void addFormatter(RASIFormatter formatter)
This method is a no-operations
addFormatter
in interface RASIHandler
formatter
- The event formatter. May be null.public void removeFormatter(RASIFormatter formatter)
This method is a no operation.
removeFormatter
in interface RASIHandler
formatter
- The event formatter. May be null.public java.util.Enumeration getFormatters()
RASIFormatters
maintained by this RASIHandlers.
getFormatters
in interface RASIHandler
public void openDevice()
This method is a no-operation.
openDevice
in interface RASIHandler
public void closeDevice()
This method is a no-operation.
closeDevice
in interface RASIHandler
public void stop()
This method is a no-operation.
stop
in interface RASIHandler
public void logEvent(RASIEvent event)
This method is a no-operation.
logEvent
in interface RASIHandler
event
- 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 RASIHandler
event
- A RAS event whose message type is currently being processed
by this Handler. Null is tolerated.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |