public class TimeServerHandler extends IoHandlerAdapter
Constructor and Description |
---|
TimeServerHandler() |
Modifier and Type | Method and Description |
---|---|
void |
exceptionCaught(IoSession session,
Throwable cause)
Trap exceptions.
|
void |
messageReceived(IoSession session,
Object message)
If the message is 'quit', we exit by closing the session.
|
void |
sessionIdle(IoSession session,
IdleStatus status)
On idle, we just write a message on the console
|
inputClosed, messageSent, sessionClosed, sessionCreated, sessionOpened
public void exceptionCaught(IoSession session, Throwable cause) throws Exception
exceptionCaught
in interface IoHandler
exceptionCaught
in class IoHandlerAdapter
Exception
public void messageReceived(IoSession session, Object message) throws Exception
messageReceived
in interface IoHandler
messageReceived
in class IoHandlerAdapter
Exception
public void sessionIdle(IoSession session, IdleStatus status) throws Exception
sessionIdle
in interface IoHandler
sessionIdle
in class IoHandlerAdapter
Exception
Copyright © 2004–2014 Apache MINA Project. All rights reserved.