|
IoHandler has been edited by Ashish Paliwal (Dec 12, 2008). Change summary: Added methods IntroductionHandles all I/O events fired by MINA. The interface is hub of all activities done at the end of the Filter Chain. IoHandler has following functions
sessionCreated EventSession Created event is fired when a new connection is created. For TCP its the result of connection accept, and for UDP this is generated when a UDP packet is received. This function can be used to initialize session attributes, and perform one time activities for a particular connection.
sessionOpened EventSession opened event is invoked when a connection is opened. Its is always called after sessionCreated event. If a thread model is configured, this function is called in a thread other than the I/O processor thread. sessionClosed EventSession Closed event is closed, when a session is closed. Session cleaning activities like cash cleanup can be performed here. sessionIdle EventSession Idle event is fired when a session becomes idle. This function is not invoked for UDP transport. exceptionCaught EventThis functions is called, when an Exception is thrown by user code or by MINA. The connection is closed, if its an IOException. messageReceived EventMessage Received event is fired whenever a message is received. This is where the most of the processing of an application happens. You need to take care of all the message type you expect here. messageSent EventMessage Sent event is fired, whenever a message aka response has been sent(calling IoSession.write()). |
Unsubscribe or edit your notifications preferences
