Class AbstractSimpleServer


  • public abstract class AbstractSimpleServer
    extends Object

    Abstract AbstractSimpleServer class.

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

      • AbstractSimpleServer

        public AbstractSimpleServer()
    • Method Detail

      • getTimeout

        public int getTimeout()

        getTimeout

        Returns:
        a int.
      • setTimeout

        public void setTimeout​(int timeout)

        setTimeout

        Parameters:
        timeout - a int.
      • getInetAddress

        public InetAddress getInetAddress()

        getInetAddress

        Returns:
        InetAddress returns the inetaddress from the serversocket.
      • getLocalPort

        public int getLocalPort()

        getLocalPort

        Returns:
        a int.
      • onInit

        protected void onInit()

        onInit

      • startServer

        public void startServer()
                         throws Exception

        startServer

        Throws:
        Exception - if any.
      • setExpectedBanner

        protected void setExpectedBanner​(String banner)

        setExpectedBanner

        Parameters:
        banner - a String object.
      • addRequestResponse

        protected void addRequestResponse​(String request,
                                          String response)

        addRequestResponse

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