com.ibm.ras

Interface RASILogger

All Superinterfaces:
RASIMaskChangeGenerator, RASIObject, java.io.Serializable
All known subinterfaces:
RASIMessageLogger, RASITraceLogger
All known implementing classes:
RASLogger, RASMessageLogger, RASTraceLogger, WsJrasMessageLogger, WsJrasTraceLogger

Deprecated. As of WAS 6.0, recommend using java.util.logging
  1. public interface RASILogger
  2. extends RASIMaskChangeGenerator
RASILogger defines the methods which are common to objects that wish to create RAS message and trace data. This interface is intended to be extended to include methods specific to the creation of message or trace data and should not be implemented directly.

An object which implements this interface may also wish to implement RASIMaskChangeListener.

Note: Classes which implement RASILogger should, in their constructors, call the addMessageEventClass and addTraceEventClass methods to register the RASIEvent classes which the logger uses. This will allow a graphical program to query the logger to determine the supported RAS events. The events, in turn, can be queried to determine their set of supported event types.

See Also:
RASIMessageLogger, RASITraceLogger

Method Summary

Modifier and Type Method and Description
  1. void
addHandler(RASIHandler handler)
Deprecated. Registers a RAS handler with this logger.
  1. void
fireRASEvent(RASIEvent event)
Deprecated. Sends a RASIEvent to all handlers which will process the event.
  1. java.lang.String
getClient()
Deprecated. Gets the name of the client which is associated with this logger.
  1. java.util.Hashtable
getConfig()
Deprecated. Gets the configuration of this object.
  1. java.util.Enumeration
getHandlers()
Deprecated. Gets all of the handlers associated with this logger.
  1. java.lang.String
getServer()
Deprecated. Gets the name of the server which is associated with this logger.
  1. boolean
isLoggable(long type)
Deprecated. Determines if a log entry will be processed by the logger and any of the handlers.
  1. boolean
isLogging()
Deprecated. Determines if a logger is logging data ("on") or not ("off").
  1. boolean
isSynchronous()
Deprecated. Determines if synchronous logging is in effect.
  1. void
removeHandler(RASIHandler handler)
Deprecated. Removes a RAS handler from this logger.
  1. void
setClient(java.lang.String name)
Deprecated. Sets the name of the client which is associated with this logger.
  1. void
setConfig(java.util.Hashtable ht)
Deprecated. Sets the configuration of this object.
  1. void
setLogging(boolean flag)
Deprecated. Sets a flag that indicates whether the logger is logging data ("on") or not ("off").
  1. void
setServer(java.lang.String name)
Deprecated. Sets the name of the server which is associated with this logger.
  1. void
setSynchronous(boolean flag)
Deprecated. Sets a flag that tells the logger whether to log data synchronously.
Methods inherited from interface com.ibm.ras.RASIMaskChangeGenerator
addMaskChangeListener, addMessageEventClass, addTraceEventClass, fireMaskChangedEvent, getMaskChangeListeners, getMessageEventClasses, getMessageMask, getTraceEventClasses, getTraceMask, removeMaskChangeListener, removeMessageEventClass, removeTraceEventClass, setMessageMask, setTraceMask
Methods inherited from interface com.ibm.ras.RASIObject
getDescription, getGroup, getName, setDescription, setName

Method Detail

getConfig

  1. java.util.Hashtable getConfig()
Deprecated.
Gets the configuration of this object.
Specified by:
Specified by:
getConfig in interface RASIObject
Returns:
A Hashtable containing the configuration. This object inserts the following key/value pairs into the configuration:

isLogging
true if the logger is logging data; otherwise, false.
isSync
true if the logger is logging synchronously; otherwise, false.
server
The server.
client
The client.
handlerNames
The names of the handlers attached to this logger.

All values are Strings. The parent and extensions of this object may add additional keys.


setConfig

  1. void setConfig(java.util.Hashtable ht)
Deprecated.
Sets the configuration of this object. This method is used by a RASManager to initialize a RAS object. It should not be necessary for an application to use this method.
Specified by:
Specified by:
setConfig in interface RASIObject
Parameters:
ht - A Hashtable containing the configuration. This object searches for the following keys:

isLogging
true if the logger is logging data; otherwise, false.
isSync
true if the logger is logging synchronously; otherwise, false.
server
The server.
client
The client.
handlerNames
The names of the handlers attached to this logger.

All values are Strings. If a key is not found, an internal default for that element is set instead. The parent and extensions of this object may use additional keys.


getClient

  1. java.lang.String getClient()
Deprecated.
Gets the name of the client which is associated with this logger.
Returns:
The client name, or an empty string ("") if the client has not been set.

setClient

  1. void setClient(java.lang.String name)
Deprecated.
Sets the name of the client which is associated with this logger. If the name is null, the current name is not changed.
Parameters:
name - The client name.

getServer

  1. java.lang.String getServer()
Deprecated.
Gets the name of the server which is associated with this logger.
Returns:
The server name, or an empty string ("") if the server has not been set.

setServer

  1. void setServer(java.lang.String name)
Deprecated.
Sets the name of the server which is associated with this logger. If the name is null, the current name is not changed.
Parameters:
name - The server name.

addHandler

  1. void addHandler(RASIHandler handler)
Deprecated.
Registers a RAS handler with this logger. More than one handler may be associated with a logger to direct the RAS data to multiple destinations. If the handler is null or is already registered, this method does nothing.
Parameters:
handler - A RAS handler.

removeHandler

  1. void removeHandler(RASIHandler handler)
Deprecated.
Removes a RAS handler from this logger. If the handler is null or is not registered, this method does nothing.
Parameters:
handler - A RAS handler.

getHandlers

  1. java.util.Enumeration getHandlers( )
Deprecated.
Gets all of the handlers associated with this logger.
Returns:
An Enumeration of handlers. If no handlers are registered, the Enumeration is empty.

isSynchronous

  1. boolean isSynchronous()
Deprecated.
Determines if synchronous logging is in effect. When logging synchronously, the logger will wait for the handlers to write a log entry before returning to the caller. Otherwise, the log entry is passed to the handler and the logger returns.
Returns:
true for synchronous logging and false otherwise.

setSynchronous

  1. void setSynchronous(boolean flag)
Deprecated.
Sets a flag that tells the logger whether to log data synchronously. When logging synchronously, the logger will wait for the handlers to write a log entry before returning to the caller. Otherwise, the log entry is passed to the handler and the logger returns.
Parameters:
flag - A boolean set true for synchronous logging and false otherwise.

isLogging

  1. boolean isLogging()
Deprecated.
Determines if a logger is logging data ("on") or not ("off").
Returns:
true when the logger is "on" and false otherwise.

setLogging

  1. void setLogging(boolean flag)
Deprecated.
Sets a flag that indicates whether the logger is logging data ("on") or not ("off").
Parameters:
flag - true when the logger is "on" and false otherwise.

isLoggable

  1. boolean isLoggable(long type)
Deprecated.
Determines if a log entry will be processed by the logger and any of the handlers. Wrapping a message or trace call with this method can improve performance. Log entries that will not be processed need not even be built. For example:
 if (isLoggable(RASITraceEvent.TYPE_PUBLIC)
   trace(RASITraceEvent.TYPE_PUBLIC...);
 
Parameters:
type - The type of the log entry. The set of possible values is defined by the RASIMessageEvent or RASITraceEvent TYPE_XXXX constants.
Returns:
true if the logger is enabled and at least one handler will process the log entry; false, otherwise.

fireRASEvent

  1. void fireRASEvent(RASIEvent event)
Deprecated.
Sends a RASIEvent to all handlers which will process the event. A null event is ignored.
Parameters:
event - The event to be sent.