public class ManagedSelector extends ContainerLifeCycle implements Dumpable
ManagedSelector wraps a Selector simplifying non-blocking operations on channels.
ManagedSelector runs the select loop, which waits on Selector.select() until events
happen for registered channels. When events happen, it notifies the EndPoint associated
with the channel.
| Modifier and Type | Class and Description |
|---|---|
static interface |
ManagedSelector.Selectable
A
ManagedSelector.Selectable is an EndPoint that wish to be
notified of non-blocking events by the ManagedSelector. |
AbstractLifeCycle.AbstractLifeCycleListenerContainer.InheritedListener, Container.ListenerLifeCycle.ListenerFAILED, RUNNING, STARTED, STARTING, STOP_ON_FAILURE, STOPPED, STOPPING| Constructor and Description |
|---|
ManagedSelector(SelectorManager selectorManager,
int id) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroyEndPoint(EndPoint endPoint) |
protected void |
doStart() |
protected void |
doStop() |
String |
dump() |
void |
dump(Appendable out,
String indent) |
Selector |
getSelector() |
int |
size() |
void |
submit(Runnable change) |
String |
toString() |
addBean, addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stoppublic ManagedSelector(SelectorManager selectorManager, int id)
protected void doStart()
throws Exception
doStart in class ContainerLifeCycleExceptionpublic int size()
protected void doStop()
throws Exception
doStop in class ContainerLifeCycleExceptionpublic void submit(Runnable change)
public void destroyEndPoint(EndPoint endPoint)
public String dump()
dump in interface Dumpabledump in class ContainerLifeCyclepublic void dump(Appendable out, String indent) throws IOException
dump in interface Dumpabledump in class ContainerLifeCycleIOExceptionpublic Selector getSelector()
Copyright © 1995–2017 Webtide. All rights reserved.