net.jxta.impl.endpoint.relay
Class RelayServerClient
java.lang.Object
net.jxta.impl.endpoint.relay.RelayServerClient
- All Implemented Interfaces:
- Runnable
class RelayServerClient
- extends Object
- implements Runnable
This class abstracts a client of the Relay Server
RelayServerClient
protected RelayServerClient(RelayServer server,
String clientPeerId,
long leaseLength,
long stallTimeout,
int clientQueueSize)
finalize
protected void finalize()
-
- Overrides:
finalize
in class Object
run
public void run()
-
Send all of the queued messages to the client.
- Specified by:
run
in interface Runnable
toString
public String toString()
-
- Overrides:
toString
in class Object
getQueueSize
protected int getQueueSize()
getLeaseRemaining
public long getLeaseRemaining()
closeClient
public void closeClient()
flushQueue
void flushQueue()
- remove all queued messages.
addMessenger
public boolean addMessenger(Messenger newMessenger)
isExpired
public boolean isExpired()
renewLease
public boolean renewLease()
getClientAddress
protected EndpointAddress getClientAddress()
getMessenger
protected Messenger getMessenger(EndpointAddress srcAddr,
EndpointAddress destAddr,
boolean outOfBand)