com.worklight.wlclient.api

Interface WLHttpResponseListener



  • public interface WLHttpResponseListener
    This interface defines methods that the listener for the resource request implements to receive notifications about the success or failure of the request.
    • Method Detail

      • onFailure

        void onFailure(org.apache.http.HttpResponse response,
                     java.lang.Exception e)
        Called if any failure occurred during the execution of the WLClient.sendRequest(HttpUriRequest request, WLHttpResponseListener listener) or one of the send methods of WLResourceRequest.

        There are two possible types of failure that are handled by this method:

        • A response with a status of 4xx or 5xx was received. In this event, the response is delivered to this method.
        • No response was received from the server. In this event, there is no response to hand to this method, and the response parameter is null. An exception object detailing the cause of the failure is given instead.
        Parameters:
        response - HTTP response that was received from the server, or null if no response was received.
        e - Exception object detailing the cause of the failure, or null if a response was received.


© Copyright IBM Corp. 2006, 2015. All Rights Reserved.