org.apache.geronimo.network
Class SelectorManager
java.lang.Object
org.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 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SelectorManager
public SelectorManager()
throws IOException
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.