org.mortbay.loadbalancer

Class Connection


public class Connection
extends java.lang.Object

Constructor Summary

Connection(ByteBufferPool bufferPool, Listener listener, SocketChannel client, int capacity)

Method Summary

void
allocate(Server server, int allocationTry)
void
client2server(SelectionKey key)
void
clientWriteWakeup(SelectionKey key)
void
close()
void
connected(SocketChannel channel, Selector selector)
void
deallocate()
SocketChannel
getClientSocketChannel()
boolean
isAllocated()
void
server2client(SelectionKey key)
void
serverWriteWakeup(SelectionKey key)
String
toString()

Constructor Details

Connection

public Connection(ByteBufferPool bufferPool,
                  Listener listener,
                  SocketChannel client,
                  int capacity)

Method Details

allocate

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

client2server

public void client2server(SelectionKey key)
            throws IOException

clientWriteWakeup

public void clientWriteWakeup(SelectionKey key)
            throws IOException

close

public void close()

connected

public void connected(SocketChannel channel,
                      Selector selector)
            throws IOException

deallocate

public void deallocate()
            throws IOException

getClientSocketChannel

public SocketChannel getClientSocketChannel()

isAllocated

public boolean isAllocated()

server2client

public void server2client(SelectionKey key)
            throws IOException

serverWriteWakeup

public void serverWriteWakeup(SelectionKey key)
            throws IOException

toString

public String toString()

Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.