/
PropertyInjector.java
34 lines (31 loc) · 1.15 KB
/
PropertyInjector.java
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
29
30
31
32
33
34
package org.jboss.resteasy.spi;
import javax.ws.rs.WebApplicationException;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public interface PropertyInjector
{
/**
* Inject values into annotated properties (fields/setter methods) of the target object.
* This method should only be used outside the scope of an HTTP request.
*
* @param target target object
* @param unwrapAsync unwrap async
* @return {@link CompletionStage}
*/
void inject(Object target);
/**
* Inject values into annotated properties (fields/setter methods) of the target object.
* This method should only be used inside the scope of an HTTP request.
*
* @param request http request
* @param response http response
* @param target target object
* @param unwrapAsync unwrap async
* @return {@link CompletionStage}
* @throws Failure if application failure occurred
* @throws WebApplicationException if application exception occurred
*/
void inject(HttpRequest request, HttpResponse response, Object target) throws Failure, WebApplicationException, ApplicationException;
}