public class ImageServerIoHandler extends IoHandlerAdapter
IoHandler
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
INDEX_KEY |
构造器和说明 |
---|
ImageServerIoHandler(javax.management.MBeanServer mBeanServer)
Creates a new instance of ImageServerIoHandler.
|
限定符和类型 | 方法和说明 |
---|---|
void |
exceptionCaught(IoSession session,
java.lang.Throwable cause)
This method will be called whenever an exception occurs.
|
void |
messageReceived(IoSession session,
java.lang.Object message)
Handle incoming messages.
|
void |
sessionCreated(IoSession session)
This method is called first when a new connection to the server is made.
|
void |
sessionOpened(IoSession session)
Called when the session is opened, which will come after the session created.
|
inputClosed, messageSent, sessionClosed, sessionIdle
public ImageServerIoHandler(javax.management.MBeanServer mBeanServer)
mBeanServer
- The JMX MBeanServer that will register the sessionspublic void sessionCreated(IoSession session) throws java.lang.Exception
sessionCreated
在接口中 IoHandler
sessionCreated
在类中 IoHandlerAdapter
session
- The session being createdjava.lang.Exception
- If we get an exception while processing the create eventIoHandlerAdapter.sessionCreated(org.apache.mina.core.session.IoSession)
public void sessionOpened(IoSession session) throws java.lang.Exception
sessionOpened
在接口中 IoHandler
sessionOpened
在类中 IoHandlerAdapter
session
- The session being openedjava.lang.Exception
- If we get an exception while processing the open eventIoHandlerAdapter.sessionOpened(org.apache.mina.core.session.IoSession)
public void exceptionCaught(IoSession session, java.lang.Throwable cause) throws java.lang.Exception
exceptionCaught
在接口中 IoHandler
exceptionCaught
在类中 IoHandlerAdapter
session
- The session for which we have got an exceptioncause
- The exception that has been caughtjava.lang.Exception
- If we get an exception while processing the caught exceptionIoHandlerAdapter.exceptionCaught(org.apache.mina.core.session.IoSession, java.lang.Throwable)
public void messageReceived(IoSession session, java.lang.Object message) throws java.lang.Exception
messageReceived
在接口中 IoHandler
messageReceived
在类中 IoHandlerAdapter
session
- The session that is receiving a messagemessage
- The received messagejava.lang.Exception
- If we get an exception while processing the received messageIoHandlerAdapter.messageReceived(org.apache.mina.core.session.IoSession, java.lang.Object)