import java.io.IOException; import java.nio.ByteBuffer; import java.nio.channels.AsynchronousSocketChannel; public interface TCPProtocol { void handleAccept(AsynchronousSocketChannel clntChan) throws IOException; void handleRead(AsynchronousSocketChannel clntChan, ByteBuffer buf, int bytesRead) throws IOException; void handleWrite(AsynchronousSocketChannel clntChan, ByteBuffer buf) throws IOException; }