org.alfresco.bm.http
Interface AuthenticatedHttpEventProcessor.HttpRequestCallback<T>

All Known Implementing Classes:
JSONArrayCallback, JSONObjectCallback, PickUserCallback
Enclosing class:
AuthenticatedHttpEventProcessor

public static interface AuthenticatedHttpEventProcessor.HttpRequestCallback<T>

Callback used when executing HTTP-request. After this has been called, the response-stream is closed automatically.

Author:
Frederik Heremans

Method Summary
 T onCallSuccess(org.apache.commons.httpclient.HttpMethod method)
          Called when call was successful.
 boolean onError(org.apache.commons.httpclient.HttpMethod method, Throwable t)
          Called when an error occurs when sending the request.
 

Method Detail

onCallSuccess

T onCallSuccess(org.apache.commons.httpclient.HttpMethod method)
Called when call was successful.

Parameters:
method - the method executed which can be used to extract response from.
Returns:
any result extracted from the response body.

onError

boolean onError(org.apache.commons.httpclient.HttpMethod method,
                Throwable t)
Called when an error occurs when sending the request.

Parameters:
method - the method executed
t - optional exception that caused the error
Returns:
true, if error is handled. False, if an exception should be thrown.


Copyright © 2012. All Rights Reserved.