edu.cuny.cat.comm
Interface ClientConnector<M extends Message>

Type Parameters:
M - the type of messages that can be transmitted through the connection.
All Superinterfaces:
Connector
All Known Implementing Classes:
CallBasedCatpClientConnector, QueueBasedCatpClientConnector, SocketBasedCatpClientConnector

public interface ClientConnector<M extends Message>
extends Connector

Defines how a client establishes a Connection to a server.

Version:
$Revision: 1.2 $
Author:
Jinzhong Niu

Method Summary
 Connection<M> connect()
          connects to a server until a Connection is established to the server.
 

Method Detail

connect

Connection<M> connect()
                                      throws ConnectionException
connects to a server until a Connection is established to the server. The concrete way to reach the server is defined by the current Infrastructure implementation.

Returns:
the Connection established with the server.
Throws:
ConnectionException - if the attempt fails.