Project JXTA

net.jxta.impl.endpoint.relay
Class RelayServerClient

java.lang.Object
  extended by 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


Nested Class Summary
protected static class RelayServerClient.RelayMessenger
           
 
Constructor Summary
protected RelayServerClient(RelayServer server, String clientPeerId, long leaseLength, long stallTimeout, int clientQueueSize)
           
 
Method Summary
 boolean addMessenger(Messenger newMessenger)
           
 void closeClient()
           
protected  void finalize()
          
(package private)  void flushQueue()
          remove all queued messages.
protected  EndpointAddress getClientAddress()
           
 long getLeaseRemaining()
           
protected  Messenger getMessenger(EndpointAddress srcAddr, EndpointAddress destAddr, boolean outOfBand)
           
protected  int getQueueSize()
           
 boolean isExpired()
           
 boolean renewLease()
           
 void run()
          

Send all of the queued messages to the client.

 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RelayServerClient

protected RelayServerClient(RelayServer server,
                            String clientPeerId,
                            long leaseLength,
                            long stallTimeout,
                            int clientQueueSize)
Method Detail

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)

JXTA J2SE