juju.reattore.core.reactor
Interface ClientSocketReactor

All Superinterfaces:
Reactor
All Known Implementing Classes:
CombinedReactor

public interface ClientSocketReactor
extends Reactor

Interface for a system that can manage client socket channels.


Method Summary
 void attach(java.nio.channels.SocketChannel ch, ClientSocketHandler handler)
          Binds this reactor to a new handler and socket.
 void connect(java.nio.channels.SocketChannel ch, java.net.SocketAddress addr, ClientSocketHandler handler)
          Similar to #attach, but takes a currently unconnected socket, connects it, and manages it.
 

Method Detail

attach

public void attach(java.nio.channels.SocketChannel ch,
                   ClientSocketHandler handler)
            throws java.io.IOException
Binds this reactor to a new handler and socket. The socket should be created and bound but otherwise unused.

Parameters:
ch - The socket to manage
handler - The handler to call when the socket changes
Throws:
java.io.IOException - on PENDING

connect

public void connect(java.nio.channels.SocketChannel ch,
                    java.net.SocketAddress addr,
                    ClientSocketHandler handler)
             throws java.io.IOException
Similar to #attach, but takes a currently unconnected socket, connects it, and manages it.

Parameters:
ch - The socket to manage
addr - The address to connect to
handler - The handler to call when the socket changes
Throws:
java.io.IOException - on PENDING


Copyright © 2002-2003 Michael Hope. All Rights Reserved.