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

Type Parameters:
M - the type of messages that can be transmitted through the connection.
All Superinterfaces:
Connector
All Known Implementing Classes:
CallBasedCatpServerConnector, QueueBasedCatpServerConnector, SocketBasedCatpServerConnector

public interface ServerConnector<M extends Message>
extends Connector

Defines how a server listens and establishes Connections from clients.

Version:
$Revision: 1.2 $
Author:
Jinzhong Niu

Method Summary
 Connection<M> accept()
          waits until a ClientConnector connects in and establish a Connection.
 void close()
          closes this connector.
 

Method Detail

accept

Connection<M> accept()
                                     throws ConnectionException
waits until a ClientConnector connects in and establish a Connection.

Returns:
the Connection established with the client.
Throws:
ConnectionException

close

void close()
           throws ConnectionException
closes this connector.

Throws:
ConnectionException