org.apache.geronimo.network
Class SelectorManager

java.lang.Object
  extended byorg.apache.geronimo.network.SelectorManager
All Implemented Interfaces:
org.apache.geronimo.gbean.GBeanLifecycle, Runnable

public class SelectorManager
extends Object
implements Runnable, org.apache.geronimo.gbean.GBeanLifecycle

The SelectorManager will manage one Selector and the thread that checks the selector.

Version:
$Revision: 1.20 $ $Date: 2004/08/21 15:59:02 $

Nested Class Summary
 class SelectorManager.Event
           
 
Constructor Summary
SelectorManager()
           
 
Method Summary
 void addInterestOps(SelectionKey selectorKey, int addOpts)
           
 void closeChannel(SelectableChannel selectableChannel)
           
 void doFail()
           
 void doStart()
           
 void doStop()
           
static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
           
 Selector getSelector()
           
 String getThreadName()
           
 org.apache.geronimo.pool.ThreadPool getThreadPool()
           
 long getTimeout()
           
 SelectionKey register(SelectableChannel selectableChannel, int ops, SelectionEventListner listener)
           
 void run()
          Main processing method for the SelectionManager object
 void setThreadName(String threadName)
           
 void setThreadPool(org.apache.geronimo.pool.ThreadPool threadPool)
           
 void setTimeout(long timeout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectorManager

public SelectorManager()
                throws IOException
Method Detail

getTimeout

public long getTimeout()

setTimeout

public void setTimeout(long timeout)

getSelector

public Selector getSelector()

getThreadPool

public org.apache.geronimo.pool.ThreadPool getThreadPool()

setThreadPool

public void setThreadPool(org.apache.geronimo.pool.ThreadPool threadPool)

getThreadName

public String getThreadName()

setThreadName

public void setThreadName(String threadName)

run

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

Specified by:
run in interface Runnable

register

public SelectionKey register(SelectableChannel selectableChannel,
                             int ops,
                             SelectionEventListner listener)
                      throws ClosedChannelException
Throws:
ClosedChannelException

closeChannel

public void closeChannel(SelectableChannel selectableChannel)
                  throws IOException
Throws:
IOException

addInterestOps

public void addInterestOps(SelectionKey selectorKey,
                           int addOpts)

doStart

public void doStart()
             throws org.apache.geronimo.gbean.WaitingException,
                    Exception
Specified by:
doStart in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
org.apache.geronimo.gbean.WaitingException
Exception

doStop

public void doStop()
            throws org.apache.geronimo.gbean.WaitingException,
                   Exception
Specified by:
doStop in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
org.apache.geronimo.gbean.WaitingException
Exception

doFail

public void doFail()
Specified by:
doFail in interface org.apache.geronimo.gbean.GBeanLifecycle

getGBeanInfo

public static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()


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