Class GwtClientCall


  • public class GwtClientCall
    extends ClientCall
    HTTP client connector call based on GWT's HTTP module.
    Author:
    Jerome Louvel
    • Constructor Detail

      • GwtClientCall

        public GwtClientCall​(GwtHttpClientHelper helper,
                             java.lang.String method,
                             java.lang.String requestUri,
                             boolean hasEntity)
        Constructor.
        Parameters:
        helper - The parent HTTP client helper.
        method - The method name.
        requestUri - The request URI.
        hasEntity - Indicates if the call will have an entity to send to the server.
    • Method Detail

      • getReasonPhrase

        public java.lang.String getReasonPhrase()
        Returns the response reason phrase.
        Overrides:
        getReasonPhrase in class Call
        Returns:
        The response reason phrase.
      • getRequestBuilder

        public RequestBuilder getRequestBuilder()
        Returns the GWT request builder.
        Returns:
        The GWT request builder.
      • getRequestEntityString

        public java.lang.String getRequestEntityString()
        Description copied from class: ClientCall
        Returns the request entity string if it exists.
        Specified by:
        getRequestEntityString in class ClientCall
        Returns:
        The request entity string if it exists.
      • getResponse

        public Response getResponse()
        Returns the GWT response.
        Returns:
        The GWT response.
      • getResponseEntityStream

        public java.io.InputStream getResponseEntityStream​(long size)
        Description copied from class: ClientCall
        Returns the response entity stream if it exists.
        Specified by:
        getResponseEntityStream in class ClientCall
        Parameters:
        size - The expected entity size or -1 if unknown.
        Returns:
        The response entity stream if it exists.
      • getResponseHeaders

        public org.restlet.client.util.Series<org.restlet.client.data.Header> getResponseHeaders()
        Returns the modifiable list of response headers.
        Overrides:
        getResponseHeaders in class Call
        Returns:
        The modifiable list of response headers.
      • getServerAddress

        public java.lang.String getServerAddress()
        Description copied from class: Call
        Returns the response address.
        Corresponds to the IP address of the responding server.
        Overrides:
        getServerAddress in class Call
        Returns:
        The response address.
      • getStatusCode

        public int getStatusCode()
        Description copied from class: Call
        Returns the status code.
        Overrides:
        getStatusCode in class Call
        Returns:
        The status code.
      • sendRequest

        public void sendRequest​(org.restlet.client.Request request,
                                org.restlet.client.Response response,
                                org.restlet.client.Uniform onResponseCallback)
                         throws java.lang.Exception
        Description copied from class: ClientCall
        Sends the request to the client. Commits the request line, headers and optional entity and send them over the network.
        Overrides:
        sendRequest in class ClientCall
        Parameters:
        request - The high-level request.
        response - The high-level response.
        onResponseCallback - The callback invoked upon request completion.
        Throws:
        java.lang.Exception
      • setResponse

        public void setResponse​(Response response)
        Sets the GWT response.
        Parameters:
        response - The GWT response.