edu.cuny.cat.comm
Class CallBasedCatpServerConnector

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

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

The implementation of ServerConnector when CallBasedInfrastructureImpl is used.

Version:
$Revision: 1.6 $
Author:
Jinzhong Niu

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

Field Detail

infrast

protected CallBasedInfrastructureImpl infrast

closed

protected boolean closed
Constructor Detail

CallBasedCatpServerConnector

public CallBasedCatpServerConnector()
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

isClosed

public boolean isClosed()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object