com.atlassian.applinks.api
Interface ApplicationLinkResponseHandler<R>

All Superinterfaces:
com.atlassian.sal.api.net.ReturningResponseHandler<com.atlassian.sal.api.net.Response,R>

public interface ApplicationLinkResponseHandler<R>
extends com.atlassian.sal.api.net.ReturningResponseHandler<com.atlassian.sal.api.net.Response,R>

Callback interface used by {@link ApplicationLinkRequest#execute(ApplicationLinkResponseHandler) method. The implementation of this interface performs actual handling of the response.

Since:
v3.0

Method Summary
 R credentialsRequired(com.atlassian.sal.api.net.Response response)
          Triggered when a call to a remote server failed because the caller does not have an established session with the server and will need to authorize requests first by visiting the authorization URL provided by AuthorisationURIGenerator.
 
Methods inherited from interface com.atlassian.sal.api.net.ReturningResponseHandler
handle
 

Method Detail

credentialsRequired

R credentialsRequired(com.atlassian.sal.api.net.Response response)
                      throws com.atlassian.sal.api.net.ResponseException
Triggered when a call to a remote server failed because the caller does not have an established session with the server and will need to authorize requests first by visiting the authorization URL provided by AuthorisationURIGenerator.

In this callback method the user still gets access to the full response the server returned.

Note that for any request, only one callback method will ever be invoked. Either this one, or ReturningResponseHandler.handle(com.atlassian.sal.api.net.Response).

If your implementation of this callback method produces a result object, you can parameterise the handler accordingly and return your result. If you are not returning anything, you can parameterise with Void and return null.

Parameters:
response - a response object. Never null.
Returns:
the result produced by this handler.
Throws:
com.atlassian.sal.api.net.ResponseException - can be thrown by when there was a problem processing the response.


Copyright © 2015 Atlassian. All rights reserved.