1 package com.atlassian.sal.api.net;
2
3
4 /**
5 * Callback interface used by {@link Request#execute(ResponseHandler)} method. Implementation of this interface performs
6 * actual handling of the response.
7 *
8 * @since 2.0
9 */
10 public interface ResponseHandler<T extends Response>
11 {
12 /**
13 * Triggered when response from {@link Request#execute(ResponseHandler)} method becomes available. Implementations
14 * of this method should handle the response.
15 *
16 * @param response a response object. Never null.
17 * @throws ResponseException If the response cannot be retrieved
18 */
19 void handle(T response) throws ResponseException;
20 }