Package org.apache.mina.handler.multiton
Interface SingleSessionIoHandler
-
- All Known Implementing Classes:
SingleSessionIoHandlerAdapter
@Deprecated public interface SingleSessionIoHandler
Deprecated.This class is not to be used anymoreA session handler without anIoSessionparameter for simplicity.A
SingleSessionIoHandleris similar to anIoHandlerwith the notable difference that aSingleSessionIoHandleris used only by one session at a time. Thus, there is noIoSessionparameter in the methods of this interface.Because events are passed to the session in order, it is possible to store conversational state as instance variables in this object.
WARNING: This class is badly named as the actualIoHandlerimplementor is in fact theSingleSessionIoHandlerDelegate.- Author:
- Apache MINA Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidevent(FilterEvent event)Deprecated.Invoked when a filter event is fired.voidexceptionCaught(Throwable cause)Deprecated.Invoked when any exception is thrown by userIoHandlerimplementation or by MINA.voidinputClosed(IoSession session)Deprecated.Invoked when a half-duplex connection is closedvoidmessageReceived(Object message)Deprecated.Invoked when protocol message is received.voidmessageSent(Object message)Deprecated.Invoked when protocol message that user requested byIoSession.write(Object)is sent out actually.voidsessionClosed()Deprecated.Invoked when the connection is closed.voidsessionCreated()Deprecated.Invoked when the session is created.voidsessionIdle(IdleStatus status)Deprecated.Invoked when the connection is idle.voidsessionOpened()Deprecated.Invoked when the connection is opened.
-
-
-
Method Detail
-
sessionCreated
void sessionCreated() throws ExceptionDeprecated.Invoked when the session is created. Initialize default socket parameters and user-defined attributes here.- Throws:
Exception- If the session can't be created- See Also:
IoHandler.sessionCreated(IoSession)
-
sessionOpened
void sessionOpened() throws ExceptionDeprecated.Invoked when the connection is opened. This method is not invoked if the transport type is UDP.- Throws:
Exception- If the session can't be opened- See Also:
IoHandler.sessionOpened(IoSession)
-
sessionClosed
void sessionClosed() throws ExceptionDeprecated.Invoked when the connection is closed. This method is not invoked if the transport type is UDP.- Throws:
Exception- If the session can't be closed- See Also:
IoHandler.sessionClosed(IoSession)
-
sessionIdle
void sessionIdle(IdleStatus status) throws Exception
Deprecated.Invoked when the connection is idle. Refer toIdleStatus. This method is not invoked if the transport type is UDP.- Parameters:
status- the type of idleness- Throws:
Exception- If the idle event can't be handled- See Also:
IoHandler.sessionIdle(IoSession, IdleStatus)
-
exceptionCaught
void exceptionCaught(Throwable cause) throws Exception
Deprecated.Invoked when any exception is thrown by userIoHandlerimplementation or by MINA. Ifcauseis instanceofIOException, MINA will close the connection automatically.- Parameters:
cause- the caught exception- Throws:
Exception- If the exception can't be handled- See Also:
IoHandler.exceptionCaught(IoSession, Throwable)
-
inputClosed
void inputClosed(IoSession session)
Deprecated.Invoked when a half-duplex connection is closed- Parameters:
session- The current session
-
messageReceived
void messageReceived(Object message) throws Exception
Deprecated.Invoked when protocol message is received. Implement your protocol flow here.- Parameters:
message- the received message- Throws:
Exception- If the received message can't be processed- See Also:
IoHandler.messageReceived(IoSession, Object)
-
messageSent
void messageSent(Object message) throws Exception
Deprecated.Invoked when protocol message that user requested byIoSession.write(Object)is sent out actually.- Parameters:
message- the sent message- Throws:
Exception- If the sent message can't be processed- See Also:
IoHandler.messageSent(IoSession, Object)
-
event
void event(FilterEvent event) throws Exception
Deprecated.Invoked when a filter event is fired. Each filter might sent a different event, this is very application specific.- Parameters:
event- The event to process- Throws:
Exception- If we get an exception while processing the event
-
-