|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.ras.RASObject | +--com.ibm.ras.RASHandler | +--com.ibm.ras.RASFileHandler
RASFileHandler
implements a RASHandler
that writes to a file. The name of the file must be specified
in the constructor or through the setFileName
method,
as no default name exists.
RASHandler
Fields inherited from class com.ibm.ras.RASHandler |
deviceOpen |
Constructor Summary | |
RASFileHandler()
Creates a RASFileHandler . |
|
RASFileHandler(java.lang.String name)
Creates a RASFileHandler . |
|
RASFileHandler(java.lang.String name,
java.lang.String desc)
Creates a RASFileHandler . |
|
RASFileHandler(java.lang.String name,
java.lang.String desc,
java.lang.String file)
Creates a RASFileHandler . |
Method Summary | |
java.util.Hashtable |
getConfig()
Gets the configuration of this object. |
java.lang.String |
getFileName()
Gets the name of the file used by this handler. |
void |
openDevice()
Opens the device to which the handler will send its log entries. |
void |
setConfig(java.util.Hashtable ht)
Sets the configuration of this object. |
void |
setFileName(java.lang.String name)
Sets the name of the file used by this handler. |
Methods inherited from class com.ibm.ras.RASHandler |
addFormatter,
addMaskChangeListener,
getFormatters,
getMaskChangeListeners,
getMessageMask,
getTraceMask,
logEvent,
removeFormatter,
removeMaskChangeListener,
run,
setMessageMask,
setTraceMask,
stop,
writeEvent |
Methods inherited from class com.ibm.ras.RASObject |
getDescription,
getName,
setDescription,
setName |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public RASFileHandler()
RASFileHandler
. The name and
description of this object are empty strings.public RASFileHandler(java.lang.String name)
RASFileHandler
. The description
of this object is an empty string.name
- The name of this object.public RASFileHandler(java.lang.String name, java.lang.String desc)
RASFileHandler
.name
- The name of this object.desc
- The description of this object.public RASFileHandler(java.lang.String name, java.lang.String desc, java.lang.String file)
RASFileHandler
.name
- The name of this object.desc
- The description of object.file
- The name of the output file.Method Detail |
public java.util.Hashtable getConfig()
Hashtable
containing the configuration.
This object inserts the following key/value pairs into the
configuration:
"fileName" The name of the output file.All values are
Strings
.
The parent and extensions of this object may add additional keys.public void setConfig(java.util.Hashtable ht)
RASManager
to initialize a RAS object. It should not
be necessary for an application to use this method.ht
- A Hashtable
containing the configuration.
This object searches for the following keys:
"fileName" The name of the output file.All values are
Strings
.
If a key is not found, that configuration element is not
updated.
The parent and extensions of this logger may use additional keys.public java.lang.String getFileName()
null
is returned.public void setFileName(java.lang.String name)
name
- The name of the output file.public void openDevice()
System.err
.
The caller should ensure that this method is not called if the device is already open or if cannot tolerate attempts to reopen it.
For the RASFileHandler
, the device is the file
named on the constructor or through the setFileName
method. New log entries are appended to the file, if it already exists.
If the file name is changed via setFileName
, this method
must be called again to open the new file.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |