Interface LoopbackRestServer

    • Method Detail

      • onHttpRequest

        void onHttpRequest​(InetSocketAddress aLocalAddress,
                           InetSocketAddress aClientAddress,
                           org.refcodes.net.HttpMethod aHttpMethod,
                           org.refcodes.net.Url aUrl,
                           org.refcodes.net.RequestHeaderFields aRequestHeaderFields,
                           String aHttpBody,
                           org.refcodes.net.HttpServerResponse aHttpServerResponse)
                    throws org.refcodes.net.HttpStatusException
        Invoke this method to simulate a REST request to be handled by the according registered RestEndpoint instances:
        Parameters:
        aLocalAddress - the local address
        aClientAddress - the client address
        aHttpMethod - The method for the simulated REST request to be used
        aUrl - The query string part of the request.
        aRequestHeaderFields - The simulated REST request's Header-Fields to be used
        aHttpBody - The raw body for the simulated REST request to be used.
        aHttpServerResponse - The HttpServerResponse to be filled with the complete result of processing the request.
        Throws:
        org.refcodes.net.HttpStatusException - the http status exception
      • onHttpRequest

        void onHttpRequest​(InetSocketAddress aLocalAddress,
                           InetSocketAddress aClientAddress,
                           org.refcodes.net.HttpMethod aHttpMethod,
                           org.refcodes.net.Url aUrl,
                           org.refcodes.net.RequestHeaderFields aRequestHeaderFields,
                           InputStream aHttpInputStream,
                           org.refcodes.net.HttpServerResponse aHttpServerResponse)
                    throws org.refcodes.net.HttpStatusException
        Invoke this method to simulate a REST request to be handled by the according registered RestEndpoint instances:.
        Parameters:
        aLocalAddress - the local address
        aClientAddress - the client address
        aHttpMethod - The method for the simulated REST request to be used
        aUrl - The query string part of the request.
        aRequestHeaderFields - The simulated REST request's Header-Fields to be used
        aHttpInputStream - The HTTP InputStream representing the body for the simulated REST request to be used.
        aHttpServerResponse - The HttpServerResponse to be filled with the complete result of processing the request.
        Throws:
        org.refcodes.net.HttpStatusException - the http status exception