public class SwingChatClientHandler extends IoHandlerAdapter
IoHandler implementation of the client side of the simple chat protocol.| 限定符和类型 | 类和说明 |
|---|---|
static interface |
SwingChatClientHandler.Callback |
| 构造器和说明 |
|---|
SwingChatClientHandler(SwingChatClientHandler.Callback callback) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
messageReceived(IoSession session,
java.lang.Object message)
Invoked when a message is received.
|
void |
sessionClosed(IoSession session)
Invoked when a connection is closed.
|
void |
sessionOpened(IoSession session)
Invoked when a connection has been opened.
|
exceptionCaught, inputClosed, messageSent, sessionCreated, sessionIdlepublic SwingChatClientHandler(SwingChatClientHandler.Callback callback)
public void sessionOpened(IoSession session) throws java.lang.Exception
IoHandlerAdapterIoHandler.sessionCreated(IoSession). The biggest difference from
IoHandler.sessionCreated(IoSession) is that it's invoked from other thread
than an I/O processor thread once thread model is configured properly.sessionOpened 在接口中 IoHandlersessionOpened 在类中 IoHandlerAdaptersession - The session being openedjava.lang.Exception - If we get an exception while processing the open eventpublic void messageReceived(IoSession session, java.lang.Object message) throws java.lang.Exception
IoHandlerAdaptermessageReceived 在接口中 IoHandlermessageReceived 在类中 IoHandlerAdaptersession - The session that is receiving a messagemessage - The received messagejava.lang.Exception - If we get an exception while processing the received messagepublic void sessionClosed(IoSession session) throws java.lang.Exception
IoHandlerAdaptersessionClosed 在接口中 IoHandlersessionClosed 在类中 IoHandlerAdaptersession - The session being closedjava.lang.Exception - If we get an exception while processing the close event