S
- the type of the IoSession
this processor can handlepublic interface IoProcessor<S extends IoSession>
IoSession
s. It abstracts existing
reactor frameworks such as Java NIO once again to simplify transport
implementations.Modifier and Type | Method and Description |
---|---|
void |
add(S session)
Adds the specified
session to the I/O processor so that
the I/O processor starts to perform any I/O operations related
with the session . |
void |
dispose()
Releases any resources allocated by this processor.
|
void |
flush(S session)
Flushes the internal write request queue of the specified
session . |
boolean |
isDisposed() |
boolean |
isDisposing() |
void |
remove(S session)
Removes and closes the specified
session from the I/O
processor so that the I/O processor closes the connection
associated with the session and releases any other related
resources. |
void |
updateTrafficControl(S session)
Controls the traffic of the specified
session depending of the
IoSession.isReadSuspended() and IoSession.isWriteSuspended()
flags |
void |
write(S session,
WriteRequest writeRequest)
Writes the WriteRequest for the specified
session . |
boolean isDisposing()
dispose()
method has
been called. Please note that this method will return true
even after all the related resources are released.boolean isDisposed()
void dispose()
void add(S session)
session
to the I/O processor so that
the I/O processor starts to perform any I/O operations related
with the session
.session
- The added sessionvoid flush(S session)
session
.session
- The session we want the message to be writtenvoid write(S session, WriteRequest writeRequest)
session
.session
- The session we want the message to be writtenwriteRequest
- the WriteRequest to writevoid updateTrafficControl(S session)
session
depending of the
IoSession.isReadSuspended()
and IoSession.isWriteSuspended()
flagssession
- The session to be updatedvoid remove(S session)
session
from the I/O
processor so that the I/O processor closes the connection
associated with the session
and releases any other related
resources.session
- The session to be removedCopyright © 2004–2021 Apache MINA Project. All rights reserved.