Class EchoHandler

  • All Implemented Interfaces:
    org.apache.hc.core5.http.io.HttpRequestHandler

    public class EchoHandler
    extends java.lang.Object
    implements org.apache.hc.core5.http.io.HttpRequestHandler
    A handler that echos the incoming request entity.
    • Constructor Summary

      Constructors 
      Constructor Description
      EchoHandler()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void handle​(org.apache.hc.core5.http.ClassicHttpRequest request, org.apache.hc.core5.http.ClassicHttpResponse response, org.apache.hc.core5.http.protocol.HttpContext context)
      Handles a request by echoing the incoming request entity.
      • Methods inherited from class java.lang.Object

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

      • EchoHandler

        public EchoHandler()
    • Method Detail

      • handle

        public void handle​(org.apache.hc.core5.http.ClassicHttpRequest request,
                           org.apache.hc.core5.http.ClassicHttpResponse response,
                           org.apache.hc.core5.http.protocol.HttpContext context)
                    throws org.apache.hc.core5.http.HttpException,
                           java.io.IOException
        Handles a request by echoing the incoming request entity. If there is no request entity, an empty document is returned.
        Specified by:
        handle in interface org.apache.hc.core5.http.io.HttpRequestHandler
        Parameters:
        request - the request
        response - the response
        context - the context
        Throws:
        org.apache.hc.core5.http.HttpException - in case of a problem
        java.io.IOException - in case of an IO problem