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 * Triggered when response from {@link Request#execute(ResponseHandler)} method becomes available. Implementations
13 * of this method should handle the response.
14 *
15 * @param response a response object. Never null.
16 * @throws ResponseException If the response cannot be retrieved
17 */
18 void handle(T response) throws ResponseException;
19 }