Class SingleSessionIoHandlerAdapter

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void exceptionCaught​(java.lang.Throwable th)
      Deprecated.
      Invoked when any exception is thrown by user IoHandler implementation or by MINA.
      protected IoSession getSession()
      Deprecated.
      Retrieves the session to which this handler is assigned.
      void inputClosed​(IoSession session)
      Deprecated.
      Invoked when a half-duplex connection is closed
      void messageReceived​(java.lang.Object message)
      Deprecated.
      Invoked when protocol message is received.
      void messageSent​(java.lang.Object message)
      Deprecated.
      Invoked when protocol message that user requested by IoSession.write(Object) is sent out actually.
      void sessionClosed()
      Deprecated.
      Invoked when the connection is closed.
      void sessionCreated()
      Deprecated.
      Invoked when the session is created.
      void sessionIdle​(IdleStatus status)
      Deprecated.
      Invoked when the connection is idle.
      void sessionOpened()
      Deprecated.
      Invoked when the connection is opened.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SingleSessionIoHandlerAdapter

        public SingleSessionIoHandlerAdapter​(IoSession session)
        Deprecated.
        Creates a new instance that is assigned to the passed in session.
        Parameters:
        session - the session to which the handler is assigned
    • Method Detail

      • getSession

        protected IoSession getSession()
        Deprecated.
        Retrieves the session to which this handler is assigned.
        Returns:
        the session
      • exceptionCaught

        public void exceptionCaught​(java.lang.Throwable th)
                             throws java.lang.Exception
        Deprecated.
        Invoked when any exception is thrown by user IoHandler implementation or by MINA. If cause is instanceof IOException, MINA will close the connection automatically.
        Specified by:
        exceptionCaught in interface SingleSessionIoHandler
        Parameters:
        th - the caught exception
        Throws:
        java.lang.Exception - If the exception can't be handled
        See Also:
        IoHandler.exceptionCaught(IoSession, Throwable)
      • inputClosed

        public void inputClosed​(IoSession session)
        Deprecated.
        Invoked when a half-duplex connection is closed
        Specified by:
        inputClosed in interface SingleSessionIoHandler
        Parameters:
        session - The current session
      • messageReceived

        public void messageReceived​(java.lang.Object message)
                             throws java.lang.Exception
        Deprecated.
        Invoked when protocol message is received. Implement your protocol flow here.
        Specified by:
        messageReceived in interface SingleSessionIoHandler
        Parameters:
        message - the received message
        Throws:
        java.lang.Exception - If the received message can't be processed
        See Also:
        IoHandler.messageReceived(IoSession, Object)
      • sessionClosed

        public void sessionClosed()
                           throws java.lang.Exception
        Deprecated.
        Invoked when the connection is closed. This method is not invoked if the transport type is UDP.
        Specified by:
        sessionClosed in interface SingleSessionIoHandler
        Throws:
        java.lang.Exception - If the session can't be closed
        See Also:
        IoHandler.sessionClosed(IoSession)
      • sessionCreated

        public void sessionCreated()
                            throws java.lang.Exception
        Deprecated.
        Invoked when the session is created. Initialize default socket parameters and user-defined attributes here.
        Specified by:
        sessionCreated in interface SingleSessionIoHandler
        Throws:
        java.lang.Exception - If the session can't be created
        See Also:
        IoHandler.sessionCreated(IoSession)
      • sessionOpened

        public void sessionOpened()
                           throws java.lang.Exception
        Deprecated.
        Invoked when the connection is opened. This method is not invoked if the transport type is UDP.
        Specified by:
        sessionOpened in interface SingleSessionIoHandler
        Throws:
        java.lang.Exception - If the session can't be opened
        See Also:
        IoHandler.sessionOpened(IoSession)