|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.core.polling.AbstractPollingIoProcessor<NioSession>
org.apache.mina.transport.socket.nio.NioProcessor
public final class NioProcessor
TODO Add documentation
Nested Class Summary | |
---|---|
protected static class |
NioProcessor.IoSessionIterator
|
Nested classes/interfaces inherited from class org.apache.mina.core.polling.AbstractPollingIoProcessor |
---|
AbstractPollingIoProcessor.SessionState |
Constructor Summary | |
---|---|
NioProcessor(Executor executor)
Creates a new instance of NioProcessor. |
Method Summary | |
---|---|
protected Iterator<NioSession> |
allSessions()
|
protected void |
destroy(NioSession session)
|
protected void |
dispose0()
|
protected void |
init(NioSession session)
|
protected boolean |
isInterestedInRead(NioSession session)
is this session registered for reading |
protected boolean |
isInterestedInWrite(NioSession session)
is this session registered for writing |
protected boolean |
isReadable(NioSession session)
Is the session ready for reading |
protected boolean |
isSelectorEmpty()
|
protected boolean |
isWritable(NioSession session)
Is the session ready for writing |
protected int |
read(NioSession session,
IoBuffer buf)
|
protected boolean |
select(int timeout)
poll those sessions for the given timeout |
protected Iterator<NioSession> |
selectedSessions()
|
protected void |
setInterestedInRead(NioSession session,
boolean value)
register a session for reading |
protected void |
setInterestedInWrite(NioSession session,
boolean value)
register a session for writing |
protected AbstractPollingIoProcessor.SessionState |
state(NioSession session)
|
protected int |
transferFile(NioSession session,
FileRegion region,
int length)
|
protected void |
wakeup()
Interrupt the {@link AbstractPollingIoProcessor#select(int) call. |
protected int |
write(NioSession session,
IoBuffer buf,
int length)
|
Methods inherited from class org.apache.mina.core.polling.AbstractPollingIoProcessor |
---|
add, dispose, flush, isDisposed, isDisposing, remove, updateTrafficMask |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NioProcessor(Executor executor)
executor
- Method Detail |
---|
protected void dispose0() throws Exception
dispose0
in class AbstractPollingIoProcessor<NioSession>
Exception
protected boolean select(int timeout) throws Exception
AbstractPollingIoProcessor
select
in class AbstractPollingIoProcessor<NioSession>
timeout
- milliseconds before the call timeout if no event appear
Exception
- if some low level IO error occursprotected boolean isSelectorEmpty()
isSelectorEmpty
in class AbstractPollingIoProcessor<NioSession>
protected void wakeup()
AbstractPollingIoProcessor
wakeup
in class AbstractPollingIoProcessor<NioSession>
protected Iterator<NioSession> allSessions()
allSessions
in class AbstractPollingIoProcessor<NioSession>
protected Iterator<NioSession> selectedSessions()
selectedSessions
in class AbstractPollingIoProcessor<NioSession>
protected void init(NioSession session) throws Exception
init
in class AbstractPollingIoProcessor<NioSession>
Exception
protected void destroy(NioSession session) throws Exception
destroy
in class AbstractPollingIoProcessor<NioSession>
Exception
protected AbstractPollingIoProcessor.SessionState state(NioSession session)
state
in class AbstractPollingIoProcessor<NioSession>
protected boolean isReadable(NioSession session)
AbstractPollingIoProcessor
isReadable
in class AbstractPollingIoProcessor<NioSession>
session
- the session queried
protected boolean isWritable(NioSession session)
AbstractPollingIoProcessor
isWritable
in class AbstractPollingIoProcessor<NioSession>
session
- the session queried
protected boolean isInterestedInRead(NioSession session)
AbstractPollingIoProcessor
isInterestedInRead
in class AbstractPollingIoProcessor<NioSession>
session
- the session queried
protected boolean isInterestedInWrite(NioSession session)
AbstractPollingIoProcessor
isInterestedInWrite
in class AbstractPollingIoProcessor<NioSession>
session
- the session queried
protected void setInterestedInRead(NioSession session, boolean value) throws Exception
AbstractPollingIoProcessor
setInterestedInRead
in class AbstractPollingIoProcessor<NioSession>
session
- the session registeredvalue
- true for registering, false for removing
Exception
protected void setInterestedInWrite(NioSession session, boolean value) throws Exception
AbstractPollingIoProcessor
setInterestedInWrite
in class AbstractPollingIoProcessor<NioSession>
session
- the session registeredvalue
- true for registering, false for removing
Exception
protected int read(NioSession session, IoBuffer buf) throws Exception
read
in class AbstractPollingIoProcessor<NioSession>
Exception
protected int write(NioSession session, IoBuffer buf, int length) throws Exception
write
in class AbstractPollingIoProcessor<NioSession>
Exception
protected int transferFile(NioSession session, FileRegion region, int length) throws Exception
transferFile
in class AbstractPollingIoProcessor<NioSession>
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |