Class AsyncSimpleServer


  • public class AsyncSimpleServer
    extends java.lang.Object

    AsyncSimpleServer class.

    Version:
    $Id: $
    Author:
    thedesloge
    • Constructor Detail

      • AsyncSimpleServer

        public AsyncSimpleServer()
    • Method Detail

      • init

        public final void init()
                        throws java.lang.Exception

        init

        Throws:
        java.lang.Exception - if any.
      • onInit

        protected void onInit()

        onInit

      • startServer

        public void startServer()
                         throws java.lang.Exception

        startServer

        Throws:
        java.lang.Exception - if any.
      • stopServer

        public void stopServer()
                        throws java.lang.Exception

        stopServer

        Throws:
        java.lang.Exception - if any.
      • addRequestHandler

        public void addRequestHandler​(java.lang.String request,
                                      java.lang.String response)

        addRequestHandler

        Parameters:
        request - a String object.
        response - a String object.
      • setBanner

        public void setBanner​(java.lang.String banner)

        setBanner

        Parameters:
        banner - a String object.
      • setExpectedClose

        public void setExpectedClose​(java.lang.String closeRequest)

        setExpectedClose

        Parameters:
        closeRequest - a String object.
      • setExpectedClose

        public void setExpectedClose​(java.lang.String closeRequest,
                                     java.lang.String closeResponse)

        setExpectedClose

        Parameters:
        closeRequest - a String object.
        closeResponse - a String object.
      • getServerHandler

        public org.apache.mina.core.service.IoHandler getServerHandler()

        getServerHandler

        Returns:
        a IoHandler object.
      • setServerHandler

        public void setServerHandler​(org.apache.mina.core.service.IoHandler handler)

        setServerHandler

        Parameters:
        handler - a IoHandler object.
      • setPort

        public void setPort​(int port)

        setPort

        Parameters:
        port - a int.
      • getPort

        public int getPort()

        getPort

        Returns:
        a int.
      • setBufferSize

        public void setBufferSize​(int bufferSize)

        setBufferSize

        Parameters:
        bufferSize - a int.
      • getBufferSize

        public int getBufferSize()

        getBufferSize

        Returns:
        a int.
      • setIdleTime

        public void setIdleTime​(int idleTime)

        setIdleTime

        Parameters:
        idleTime - a int.
      • getIdleTime

        public int getIdleTime()

        getIdleTime

        Returns:
        a int.