edu.cuny.cat.comm
Class SocketBasedCatpServerConnector

java.lang.Object
  extended by edu.cuny.cat.comm.SocketBasedCatpServerConnector
All Implemented Interfaces:
Connector, ServerConnector<CatpMessage>

public class SocketBasedCatpServerConnector
extends java.lang.Object
implements ServerConnector<CatpMessage>

The implementation of ServerConnector when SocketBasedInfrastructureImpl is used.

Version:
$Revision: 1.19 $
Author:
Jinzhong Niu

Constructor Summary
SocketBasedCatpServerConnector()
           
 
Method Summary
 Connection<CatpMessage> accept()
          waits until a ClientConnector connects in and establish a Connection.
 void close()
          closes this connector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocketBasedCatpServerConnector

public SocketBasedCatpServerConnector()
Method Detail

accept

public Connection<CatpMessage> accept()
                               throws ConnectionException
Description copied from interface: ServerConnector
waits until a ClientConnector connects in and establish a Connection.

Specified by:
accept in interface ServerConnector<CatpMessage>
Returns:
the Connection established with the client.
Throws:
ConnectionException

close

public void close()
           throws ConnectionException
Description copied from interface: ServerConnector
closes this connector.

Specified by:
close in interface ServerConnector<CatpMessage>
Throws:
ConnectionException