edu.cuny.cat.comm
Class QueueBasedCatpServerConnector

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

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

The implementation of ServerConnector when QueueBasedInfrastructureImpl is used.

Version:
$Revision: 1.11 $
Author:
Jinzhong Niu

Field Summary
protected  boolean closed
           
protected  QueueBasedInfrastructureImpl infrast
           
 
Constructor Summary
QueueBasedCatpServerConnector()
           
 
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 QueueBasedInfrastructureImpl infrast

closed

protected boolean closed
Constructor Detail

QueueBasedCatpServerConnector

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