package com.atlassian.sal.api.net;

/**
 * @since   v2.2.0
 */
public interface ReturningResponseHandler<T extends Response, R>
{
    /**
     * Triggered when response from {@link Request#executeAndReturn(ReturningResponseHandler)}
     * method becomes available. Implementations of this method should handle the response.
     *
     * @param response a response object. Never {@code null}.
     * @throws ResponseException If the response cannot be retrieved
     */
    R handle(T response) throws ResponseException;
}

@@ -36,16 +36,399 @@
 %0A/**%0A * 
+Callback interface used by the %7B@link Request#executeAndReturn(ReturningResponseHandler)%7D%0A * method. Implementation of this interface performs actual handling of the%0A * response.%0A * %3Cp%3E%0A * If no result will be produced, then instead of using this class, implement%0A * %7B@link com.atlassian.sal.api.net.ResponseHandler%7D and pass it to%0A * %7B@link Request#execute(ResponseHandler)%7D.%0A *%0A * 
 @since  
@@ -432,14 +432,11 @@
 e   
-v2.
 2.
-0
+2
 %0A */
@@ -705,16 +705,16 @@
 %0A     *%0A
-
      * @
@@ -767,16 +767,68 @@
  null%7D.%0A
+     * @return the result produces by this handler.%0A
      * @

Add a new Request.execute(ResponseHandler) method that returns a generic result Added more javadoc.