public interface IoHandler
IoService
.
You should handle your business logic in an IoHandler implementation.
The IoFilter
is dedicated to message transformation, but the IoHandler is mean to be the core of your
business logic.
If you need to implement blocking code in your IoHandler
, then you need to add a IoHandlerExecutor
in
the enclosing IoService
.
Modifier and Type | Method and Description |
---|---|
void |
exceptionCaught(IoSession session,
Exception cause)
Invoked when any runtime exception is thrown during session processing (filters, unexpected error, etc..).
|
void |
messageReceived(IoSession session,
Object message)
Invoked when a message is received.
|
void |
messageSent(IoSession session,
Object message)
Invoked when a high level message was written to the low level O/S buffer.
|
void |
serviceActivated(IoService service)
Invoked when a new service is activated by an
IoService . |
void |
serviceInactivated(IoService service)
Invoked when a service is inactivated by an
IoService . |
void |
sessionClosed(IoSession session)
Invoked when a connection is closed.
|
void |
sessionIdle(IoSession session,
IdleStatus status)
Invoked with the related
IdleStatus when a connection becomes idle. |
void |
sessionOpened(IoSession session)
Invoked when a connection has been opened.
|
void sessionOpened(IoSession session)
session
- IoSession
associated with the invocationvoid sessionClosed(IoSession session)
session
- IoSession
associated with the invocationvoid sessionIdle(IoSession session, IdleStatus status)
IdleStatus
when a connection becomes idle.session
- IoSession
associated with the invocationvoid messageReceived(IoSession session, Object message)
session
- IoSession
associated with the invocationmessage
- the incoming message to processvoid messageSent(IoSession session, Object message)
session
- IoSession
associated with the invocationmessage
- the incoming message to processvoid serviceActivated(IoService service)
IoService
.service
- the IoService
void serviceInactivated(IoService service)
IoService
.service
- the IoService
Copyright © 2009–2013 Apache MINA Project. All rights reserved.