public class Acceptor extends Object
Acceptor that will accept socketsDispatcher.
Acceptor is attachmentServerSocketChannel SelectionKey registered on
Accept Dispatcher Selector.Acceptor will create new AConnection object using
ConnectionFactory.create(SocketChannel socket)DispatcherSelector as ready for io read operations.Dispatcher,
ServerSocketChannel,
SelectionKey,
SocketChannel,
Selector,
AConnection,
ConnectionFactory,
NioServer| Modifier and Type | Method and Description |
|---|---|
void |
accept(SelectionKey key)
Method called by Accept
Dispatcher Selector
when socketconnects to ServerSocketChannel listening for connections. |
public final void accept(SelectionKey key) throws IOException
Dispatcher Selector
when socketServerSocketChannel listening for connections.AConnection will be created by
ConnectionFactory,Dispatchers
Selector as ready for io read operations.
key - SelectionKey representing
ServerSocketChannel that is acceptingIOExceptionDispatcher,
ServerSocketChannel,
SelectionKey,
SocketChannel,
Selector,
AConnection,
ConnectionFactoryCopyright © 2014–2015. All rights reserved.