|
|||||||||
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.RASSocketHandler
RASSocketHandler
implements a RASHandler
that writes to a TCP socket. If the server or port is changed through
the setServer
or setPort
method, call the
connect
method to open a socket to the server.
The default server is "localhost" and the default port is 9991.
RASHandler
Fields inherited from class com.ibm.ras.RASHandler |
deviceOpen |
Constructor Summary | |
RASSocketHandler()
Creates a RASSocketHandler . |
|
RASSocketHandler(java.lang.String name)
Creates a RASSocketHandler . |
|
RASSocketHandler(java.lang.String name,
java.lang.String desc)
Creates a RASSocketHandler . |
|
RASSocketHandler(java.lang.String name,
java.lang.String desc,
java.lang.String server,
int port)
Creates a RASSocketHandler . |
Method Summary | |
java.util.Hashtable |
getConfig()
Gets the configuration of this object. |
int |
getPort()
Gets the port number of the TCP socket. |
java.lang.String |
getServer()
Gets the server to which the handler connects. |
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 |
setPort(int port)
Sets the port number of the TCP socket. |
void |
setServer(java.lang.String server)
Sets the name of the server to which the handler connects. |
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 RASSocketHandler()
RASSocketHandler
. The name and
description of this object are empty strings.public RASSocketHandler(java.lang.String name)
RASSocketHandler
. The description
of this object is an empty string.name
- The name of this object.public RASSocketHandler(java.lang.String name, java.lang.String desc)
RASSocketHandler
.name
- The name of this object.desc
- The description of this object.public RASSocketHandler(java.lang.String name, java.lang.String desc, java.lang.String server, int port)
RASSocketHandler
.name
- The name of this object.desc
- The description of this object.server
- The name of the server to which this handler connects.port
- The TCP port number on which this handler connects.Method Detail |
public java.util.Hashtable getConfig()
Hashtable
containing the configuration.
This object inserts the following key/value pairs into the
configuration:
"port" The TCP port on which this handler will connect. "server" The name of the server to which this handler will connect.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:
"port" The TCP port on which this handler will connect. "server" The name of the server to which this handler will connect.All values are
Strings
.
If a key is not found, that configuration element is not
updated.
The parent and extensions of this object may add additional keys.public int getPort()
public void setPort(int port)
port
- The TCP port number on which the handler connects.public java.lang.String getServer()
public void setServer(java.lang.String server)
null
, the current server is not changed.server
- The name of the server.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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |