public class Connection
extends java.lang.Object
| Constructor and Description |
|---|
Connection(ByteBufferPool bufferPool,
Listener listener,
java.nio.channels.SocketChannel client,
int capacity) |
| Modifier and Type | Method and Description |
|---|---|
void |
allocate(Server server,
int allocationTry) |
void |
client2server(java.nio.channels.SelectionKey key) |
void |
clientWriteWakeup(java.nio.channels.SelectionKey key) |
void |
close() |
void |
connected(java.nio.channels.SocketChannel channel,
java.nio.channels.Selector selector) |
void |
deallocate() |
java.nio.channels.SocketChannel |
getClientSocketChannel() |
boolean |
isAllocated() |
void |
server2client(java.nio.channels.SelectionKey key) |
void |
serverWriteWakeup(java.nio.channels.SelectionKey key) |
java.lang.String |
toString() |
public Connection(ByteBufferPool bufferPool, Listener listener, java.nio.channels.SocketChannel client, int capacity)
public java.nio.channels.SocketChannel getClientSocketChannel()
public void client2server(java.nio.channels.SelectionKey key)
throws java.io.IOException
java.io.IOExceptionpublic void serverWriteWakeup(java.nio.channels.SelectionKey key)
throws java.io.IOException
java.io.IOExceptionpublic void server2client(java.nio.channels.SelectionKey key)
throws java.io.IOException
java.io.IOExceptionpublic void clientWriteWakeup(java.nio.channels.SelectionKey key)
throws java.io.IOException
java.io.IOExceptionpublic void allocate(Server server, int allocationTry) throws java.io.IOException
java.io.IOExceptionpublic void deallocate()
throws java.io.IOException
java.io.IOExceptionpublic void connected(java.nio.channels.SocketChannel channel,
java.nio.channels.Selector selector)
throws java.io.IOException
java.io.IOExceptionpublic boolean isAllocated()
public void close()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.