public class SwingChatClientHandler extends IoHandlerAdapter
IoHandler
implementation of the client side of the simple chat protocol.Modifier and Type | Class and Description |
---|---|
static interface |
SwingChatClientHandler.Callback |
Constructor and Description |
---|
SwingChatClientHandler(SwingChatClientHandler.Callback callback) |
Modifier and Type | Method and Description |
---|---|
void |
messageReceived(IoSession session,
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, sessionIdle
public SwingChatClientHandler(SwingChatClientHandler.Callback callback)
public void sessionOpened(IoSession session) throws Exception
IoHandler
IoHandler.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
in interface IoHandler
sessionOpened
in class IoHandlerAdapter
Exception
public void messageReceived(IoSession session, Object message) throws Exception
IoHandler
messageReceived
in interface IoHandler
messageReceived
in class IoHandlerAdapter
Exception
public void sessionClosed(IoSession session) throws Exception
IoHandler
sessionClosed
in interface IoHandler
sessionClosed
in class IoHandlerAdapter
Exception
Copyright © 2004–2014 Apache MINA Project. All rights reserved.