org.mortbay.loadbalancer
Class Connection

java.lang.Object
  |
  +--org.mortbay.loadbalancer.Connection

public class Connection
extends java.lang.Object


Constructor Summary
Connection(ByteBufferPool bufferPool, Listener listener, java.nio.channels.SocketChannel client, int capacity)
           
 
Method Summary
 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()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Connection

public Connection(ByteBufferPool bufferPool,
                  Listener listener,
                  java.nio.channels.SocketChannel client,
                  int capacity)
Method Detail

getClientSocketChannel

public java.nio.channels.SocketChannel getClientSocketChannel()

client2server

public void client2server(java.nio.channels.SelectionKey key)
                   throws java.io.IOException
java.io.IOException

serverWriteWakeup

public void serverWriteWakeup(java.nio.channels.SelectionKey key)
                       throws java.io.IOException
java.io.IOException

server2client

public void server2client(java.nio.channels.SelectionKey key)
                   throws java.io.IOException
java.io.IOException

clientWriteWakeup

public void clientWriteWakeup(java.nio.channels.SelectionKey key)
                       throws java.io.IOException
java.io.IOException

allocate

public void allocate(Server server,
                     int allocationTry)
              throws java.io.IOException
java.io.IOException

deallocate

public void deallocate()
                throws java.io.IOException
java.io.IOException

connected

public void connected(java.nio.channels.SocketChannel channel,
                      java.nio.channels.Selector selector)
               throws java.io.IOException
java.io.IOException

isAllocated

public boolean isAllocated()

close

public void close()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright ? 2000 Mortbay Consulting Pty. Ltd. All Rights Reserved.