public class SelectorManager extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
REACTOR_ATTRIBUTE |
| 构造器和说明 |
|---|
SelectorManager(int selectorPoolSize,
NioController controller,
Configuration conf) |
| 限定符和类型 | 方法和说明 |
|---|---|
NioController |
getController() |
Reactor |
getReactorByIndex(int index)
Find reactor by index
|
int |
getSelectorCount() |
boolean |
isStarted() |
Reactor |
nextReactor()
Get next reactor
|
Reactor |
registerChannel(SelectableChannel channel,
int ops,
Object attachment)
Register channel
|
void |
registerSession(Session session,
EventType event)
Register session
|
void |
start() |
void |
stop() |
public static final String REACTOR_ATTRIBUTE
public SelectorManager(int selectorPoolSize,
NioController controller,
Configuration conf)
throws IOException
IOExceptionpublic int getSelectorCount()
public void start()
public Reactor getReactorByIndex(int index)
index - public void stop()
public final Reactor registerChannel(SelectableChannel channel, int ops, Object attachment)
channel - ops - attachment - public final Reactor nextReactor()
public final void registerSession(Session session, EventType event)
session - event - public NioController getController()
public final boolean isStarted()
Copyright © 2013. All Rights Reserved.