de.unkrig.commons.net
Interface NioTcpServer.ConnectionHandler

Enclosing class:
NioTcpServer

public static interface NioTcpServer.ConnectionHandler

Represents a TCP connection to a remote peer (e.g. a server or a client).

See Also:
handleConnection(ReadableByteChannel, WritableByteChannel, InetSocketAddress, InetSocketAddress, Multiplexer, Stoppable)

Method Summary
 void handleConnection(java.nio.channels.ReadableByteChannel in, java.nio.channels.WritableByteChannel out, java.net.InetSocketAddress localSocketAddress, java.net.InetSocketAddress remoteSocketAddress, Multiplexer multiplexer, Stoppable stoppable)
          A connection was accepted; use the multiplexer to wait until in, out or some other SelectableChannel becomes readable or writable.
 

Method Detail

handleConnection

void handleConnection(java.nio.channels.ReadableByteChannel in,
                      java.nio.channels.WritableByteChannel out,
                      java.net.InetSocketAddress localSocketAddress,
                      java.net.InetSocketAddress remoteSocketAddress,
                      Multiplexer multiplexer,
                      Stoppable stoppable)
                      throws java.lang.Exception
A connection was accepted; use the multiplexer to wait until in, out or some other SelectableChannel becomes readable or writable.

Parameters:
stoppable - Stopping this will break the connection
Throws:
java.lang.Exception