com.maverick.nio
Class ClientAcceptor

java.lang.Object
  extended by com.maverick.nio.ClientAcceptor

public abstract class ClientAcceptor
extends Object

An abstract class for the NIO framework to accept client connections.

Author:
Lee David Painter

Constructor Summary
ClientAcceptor(ProtocolContextFactory protocolContext)
          Construct an acceptor with a protocol context.
 
Method Summary
 boolean finishAccept(SelectionKey key)
          Called by the framework when the OP_ACCEPT event is fired for this acceptor.
abstract  boolean finishAccept(SelectionKey key, ProtocolContextFactory protocolContextFactory)
          Complete the accept operation.
abstract  void stopAccepting()
          Stop accepting clients
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientAcceptor

public ClientAcceptor(ProtocolContextFactory protocolContext)
Construct an acceptor with a protocol context.

Parameters:
protocolContext - ProtocolContext
Method Detail

finishAccept

public boolean finishAccept(SelectionKey key)
Called by the framework when the OP_ACCEPT event is fired for this acceptor.

Parameters:
key - SelectionKey
Returns:
boolean

finishAccept

public abstract boolean finishAccept(SelectionKey key,
                                     ProtocolContextFactory protocolContextFactory)
Complete the accept operation.

Parameters:
key - SelectionKey
protocolContext - ProtocolContext
Returns:
boolean

stopAccepting

public abstract void stopAccepting()
Stop accepting clients



Copyright © 2012. All Rights Reserved.