|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dracoware.rsplib.RspServer
public class RspServer
An RspServer
object represents a single rspd server (which has
a related set of modules).
Constructor Summary | |
---|---|
RspServer(java.lang.String name)
Creates an RspServer object with the specified name. |
|
RspServer(java.lang.String name,
java.lang.String IP,
int port)
Creates an RspServer object with the specified name, IP, and port. |
|
RspServer(java.lang.String name,
java.lang.String IP,
int port,
int connectionTimeout,
int transmissionTimeout)
Creates an RspServer object with the specified name IP, port and timeouts. |
|
RspServer(java.lang.String name,
java.lang.String IP,
int port,
int connectionTimeout,
int transmissionTimeout,
boolean persistent)
Creates an RspServer object with the specified name IP, port, timeouts,
and persistent setting. |
Method Summary | |
---|---|
void |
connect()
Connects to an RSPServer (a node) and gathers its current information. |
void |
disconnect()
Disconnects from the rspd if persistently connected. |
int |
getConnectionTimeout()
Returns the amount of time (in milliseconds) to wait while connecting to this rspd. |
java.util.Vector |
getData()
Returns the data for this rspd. |
int |
getIndex()
Returns the index value set for this node. |
java.lang.String |
getIP()
Returns the IP address of this rspd. |
java.util.Date |
getLastContacted()
Returns the time when this rspd was last contacted. |
java.lang.String |
getName()
Returns the name of this rspd. |
int |
getPort()
Returns the port for this rspd. |
long |
getTimeToTrialExpire()
Gets the time (in seconds) until the rspd expires - when in trial mode. |
int |
getTransmissionTimeout()
Returns the amount of time (in milliseconds) to wait while sending/receiving data from this rspd. |
boolean |
isConnected()
Returns true if this rspd is connected, and false otherwise. |
boolean |
isPersistent()
Returns true if this rspd is persistent, and false otherwise. |
boolean |
isThresholdCrossed()
Returns true if a threshold has been crossed for any of the modules known to this RspServer . |
void |
sendKeepAlive()
Sends a keep alive packet to the rsp server if we have already persistently connected to the server. |
void |
setConnected(boolean connected)
Set whether this rspd is connected currently or not. |
void |
setConnectionTimeout(int connectionTimeout)
Sets the amount of time to wait (in milliseconds) while connecting to this rspd. |
void |
setContacted()
Tells this node to set its lastContacted field to the current time. |
void |
setData(java.util.Vector data)
Sets the data for this rspd. |
void |
setIndex(int index)
Sets an index value for this node. |
void |
setIP(java.lang.String ip)
Sets the IP address of this rspd. |
void |
setName(java.lang.String n)
Sets the name of this rspd. |
void |
setPersistent(boolean persistent)
Sets whether or not the node is persistent. |
void |
setPort(int port)
Sets the port of this rspd. |
void |
setTransmissionTimeout(int transmissionTimeout)
Sets the amount of time to wait (in milliseconds) while sending/receiving data from this rspd. |
java.lang.String |
toString()
Creates a String representation of this rspd. |
void |
updateTime()
Sets the last contacted time to right now. |
void |
useSSL(java.io.File keyfile)
Specifies to use SSL communication. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RspServer(java.lang.String name)
RspServer
object with the specified name.
name
- Name of this rspd.public RspServer(java.lang.String name, java.lang.String IP, int port)
RspServer
object with the specified name, IP, and port.
name
- Name of this rspd.IP
- IP address of this rspd.port
- Port of this rspd.public RspServer(java.lang.String name, java.lang.String IP, int port, int connectionTimeout, int transmissionTimeout)
RspServer
object with the specified name IP, port and timeouts.
name
- Name of this rspd.IP
- IP address of this rspd.port
- Port of this rspd.connectionTimeout
- Timeout (in milliseconds) before giving up trying to connect to this rspd.transmissionTimeout
- Timeout (in milliseconds) before giving up sending/receiving data to this rspd.public RspServer(java.lang.String name, java.lang.String IP, int port, int connectionTimeout, int transmissionTimeout, boolean persistent)
RspServer
object with the specified name IP, port, timeouts,
and persistent setting.
name
- Name of this rspd.IP
- IP address of this rspd.port
- Port of this rspd.connectionTimeout
- Timeout (in milliseconds) before giving up trying to connect to this rspd.transmissionTimeout
- Timeout (in milliseconds) before giving up sending/receiving data to this rspd.persistent
- Whether or not this node should be persistent.Method Detail |
---|
public void useSSL(java.io.File keyfile) throws java.io.IOException, javax.net.ssl.SSLException
keyfile
- The SSL keyfile. If it doesn't exist, we create it.
java.io.IOException
- If we are unable to access the keyfile.
javax.net.ssl.SSLException
- If SSL errors occur.public void connect() throws java.io.IOException
java.io.IOException
- If there are problems communicating with the rspd.public void updateTime()
public void sendKeepAlive() throws java.io.IOException
java.io.IOException
- If there was a communication problem.public void disconnect()
public boolean isThresholdCrossed()
RspServer
.
public void setName(java.lang.String n)
n
- The name of this rspd.public java.lang.String getName()
public void setIP(java.lang.String ip)
ip
- The IP address of this rspd.public java.lang.String getIP()
public void setPort(int port)
port
- The port of this rspdpublic int getPort()
public void setData(java.util.Vector data)
data
- The data for this rspd.public java.util.Vector getData()
public boolean isConnected()
public void setConnected(boolean connected)
connected
- Whether this rspd is currently connected or not.public java.util.Date getLastContacted()
public void setContacted()
public java.lang.String toString()
String
representation of this rspd.
toString
in class java.lang.Object
String
representation of this rspd.public void setConnectionTimeout(int connectionTimeout)
connectionTimeout
- Amount of time to wait (in milliseconds) while connecting to this rspd.public int getConnectionTimeout()
public void setTransmissionTimeout(int transmissionTimeout)
transmissionTimeout
- The amount of time to wait (in milliseconds) while sending/receiving data from this rspd.public int getTransmissionTimeout()
public void setPersistent(boolean persistent)
persistent
- Whether or not the node is persistent.public boolean isPersistent()
public int getIndex()
public void setIndex(int index)
index
- The index value.public long getTimeToTrialExpire()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |