org.activeio.oneport
Class OnePortAsyncChannelServer

java.lang.Object
  extended by org.activeio.FilterAsyncChannelServer
      extended by org.activeio.oneport.OnePortAsyncChannelServer
All Implemented Interfaces:
AcceptListener, AsyncChannelServer, Channel, ChannelServer, Disposable, Service

public final class OnePortAsyncChannelServer
extends FilterAsyncChannelServer

Allows multiple protocols share a single ChannelServer. All protocols sharing the server must have a distinct magic number at the beginning of the client's request. TODO: handle the case where a client opens a connection but sends no data down the stream. We need to timeout that client.

Version:
$Revision$

Field Summary
 
Fields inherited from class org.activeio.FilterAsyncChannelServer
acceptListener, next
 
Fields inherited from interface org.activeio.Service
NO_WAIT_TIMEOUT, WAIT_FOREVER_TIMEOUT
 
Constructor Summary
OnePortAsyncChannelServer(AsyncChannelServer server)
           
 
Method Summary
 AsyncChannelServer bindAsyncChannel(ProtocolRecognizer recognizer)
           
 void setAcceptListener(AcceptListener acceptListener)
          Registers an AcceptListener which is notified of accepted channels.
 
Methods inherited from class org.activeio.FilterAsyncChannelServer
dispose, getBindURI, getConnectURI, narrow, onAccept, onAcceptError, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OnePortAsyncChannelServer

public OnePortAsyncChannelServer(AsyncChannelServer server)
                          throws IOException
Throws:
IOException
Method Detail

setAcceptListener

public void setAcceptListener(AcceptListener acceptListener)
Description copied from interface: AsyncChannelServer
Registers an AcceptListener which is notified of accepted channels.

Specified by:
setAcceptListener in interface AsyncChannelServer
Overrides:
setAcceptListener in class FilterAsyncChannelServer

bindAsyncChannel

public AsyncChannelServer bindAsyncChannel(ProtocolRecognizer recognizer)
                                    throws IOException
Throws:
IOException


Copyright © -2009 The ActiveIO Project. All Rights Reserved.