org.elkoserver.foundation.net
Class ConnectionRetrier

java.lang.Object
  extended by org.elkoserver.foundation.net.ConnectionRetrier

public class ConnectionRetrier
extends Object

Worker object to manage an ongoing attempt to establish an outbound TCP connection, so that failed connection attempts can be retried automatically.


Constructor Summary
ConnectionRetrier(HostDesc host, String label, NetworkManager networkManager, MessageHandlerFactory actualFactory, Trace appTrace)
          Attempt to initiate a connection to another host, with retry on failure.
 
Method Summary
 void giveUp()
          Stop retrying this connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionRetrier

public ConnectionRetrier(HostDesc host,
                         String label,
                         NetworkManager networkManager,
                         MessageHandlerFactory actualFactory,
                         Trace appTrace)
Attempt to initiate a connection to another host, with retry on failure.

Parameters:
host - Description of host to connect to.
label - String describing remote connection endpoint, for diagnostic output
networkManager - Network manager to actually make the connection.
actualFactory - Application-provided message handler factory for use once connection is established.
appTrace - Application trace object for logging.
Method Detail

giveUp

public void giveUp()
Stop retrying this connection.