forked from OpenFeign/feign
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResponseInterceptor.java
More file actions
28 lines (25 loc) · 918 Bytes
/
Copy pathResponseInterceptor.java
File metadata and controls
28 lines (25 loc) · 918 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package feign;
/**
* Zero or more {@code ResponseInterceptor} may be configured for purposes such as verify or modify
* headers of response, verify the business status of decoded object. No guarantees are given with
* regards to the order that interceptors are applied. Once interceptors are applied,
* {@link ResponseInterceptor#beforeDecode(Response)} is called before decode method called,
* {@link ResponseInterceptor#afterDecode(Object)} is called after decode method called.
*/
public interface ResponseInterceptor {
/**
* Called for response before decode, add data on the supplied {@link Response} or doing
* customized logic
*
* @param response
* @return
*/
void beforeDecode(Response response);
/**
* Called for response after decode, add data to decoded object or doing customized logic
*
* @param response
* @return
*/
void afterDecode(Object response);
}