org.apache.geronimo.remoting.transport.async.nio
Class SelectorManager

java.lang.Object
  extended byorg.apache.geronimo.remoting.transport.async.nio.SelectorManager
All Implemented Interfaces:
Runnable

public class SelectorManager
extends Object
implements Runnable

The SelectorManager will manage one Selector and the thread that checks the selector. We may need to consider running more than one thread to check the selector if servicing the selector takes too long.

Version:
$Revision: 1.3 $ $Date: 2004/03/10 09:59:20 $

Constructor Summary
protected SelectorManager()
           
 
Method Summary
static SelectorManager getInstance()
           
 SelectionKey register(SocketChannel socketChannel, int ops, SelectionEventListner listner)
           
 void run()
          Main processing method for the SelectionManager object
 void setInterestOps(SelectionKey selectionKey, int ops)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectorManager

protected SelectorManager()
                   throws IOException
Method Detail

getInstance

public static SelectorManager getInstance()
                                   throws IOException
Throws:
IOException

run

public void run()
Main processing method for the SelectionManager object

Specified by:
run in interface Runnable

start

public void start()

stop

public void stop()

register

public SelectionKey register(SocketChannel socketChannel,
                             int ops,
                             SelectionEventListner listner)
                      throws ClosedChannelException
Parameters:
socketChannel -
Returns:
Throws:
ClosedChannelException

setInterestOps

public void setInterestOps(SelectionKey selectionKey,
                           int ops)
Parameters:
selectionKey -


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.