Class HttpClientHelper

  • Direct Known Subclasses:
    GwtHttpClientHelper

    public abstract class HttpClientHelper
    extends ClientHelper
    Base HTTP client connector. Here is the list of parameters that are supported. They should be set in the Client's context before it is started:
    list of supported parameters
    Parameter name Value type Default value Description
    adapter String org.restlet.client.engine.adapter.ClientAdapter Class name of the adapter of low-level HTTP calls into high level requests and responses.
    Author:
    Jerome Louvel
    • Constructor Detail

      • HttpClientHelper

        public HttpClientHelper​(org.restlet.client.Client client)
        Constructor.
        Parameters:
        client - The client to help.
    • Method Detail

      • create

        public abstract ClientCall create​(org.restlet.client.Request request)
        Creates a low-level HTTP client call from a high-level request.
        Parameters:
        request - The high-level request.
        Returns:
        A low-level HTTP client call.
      • getAdapter

        public ClientAdapter getAdapter()
                                 throws java.lang.Exception
        Returns the adapter from uniform calls to HTTP calls.
        Returns:
        the adapter from uniform calls to HTTP calls.
        Throws:
        java.lang.Exception
      • getSocketConnectTimeoutMs

        public int getSocketConnectTimeoutMs()
        Returns the connection timeout. Defaults to 15000.
        Returns:
        The connection timeout.
      • handle

        public void handle​(org.restlet.client.Request request,
                           org.restlet.client.Response response)
        Description copied from class: RestletHelper
        Handles a call.
        Overrides:
        handle in class RestletHelper<org.restlet.client.Client>
        Parameters:
        request - The request to handle.
        response - The response to update.
      • setAdapter

        public void setAdapter​(ClientAdapter adapter)
        Sets the adapter from uniform calls to HTTP calls.
        Parameters:
        adapter - The adapter to set.