com.atlassian.sal.api.net
Interface ReturningResponseHandler<T extends Response,R>


public interface ReturningResponseHandler<T extends Response,R>

Callback interface used by the Request.executeAndReturn(ReturningResponseHandler) method. Implementation of this interface performs actual handling of the response.

If no result will be produced, then instead of using this class, implement ResponseHandler and pass it to Request.execute(ResponseHandler).

Since:
2.2

Method Summary
 R handle(T response)
          Triggered when response from Request.executeAndReturn(ReturningResponseHandler) method becomes available.
 

Method Detail

handle

R handle(T response)
         throws ResponseException
Triggered when response from Request.executeAndReturn(ReturningResponseHandler) method becomes available. Implementations of this method should handle the response.

Parameters:
response - a response object. Never null.
Returns:
the result produces by this handler.
Throws:
ResponseException - If the response cannot be retrieved


Copyright © 2010 Atlassian. All Rights Reserved.