public class POJOResourceFactory extends Object implements ResourceFactory
Constructor and Description |
---|
POJOResourceFactory(Class<?> scannableClass)
Deprecated.
|
POJOResourceFactory(ResourceBuilder resourceBuilder,
Class<?> scannableClass) |
POJOResourceFactory(ResourceBuilder resourceBuilder,
ResourceClass resourceClass) |
POJOResourceFactory(ResourceClass resourceClass) |
Modifier and Type | Method and Description |
---|---|
Object |
createResource(HttpRequest request,
HttpResponse response,
ResteasyProviderFactory factory)
Called per request to obtain a resource instance to invoke http request on.
|
Class<?> |
getScannableClass()
Class to scan for jax-rs annotations
|
void |
registered(ResteasyProviderFactory factory)
Callback after registration has been completed.
|
void |
requestFinished(HttpRequest request,
HttpResponse response,
Object resource)
Callback when request is finished.
|
void |
unregistered() |
@Deprecated public POJOResourceFactory(Class<?> scannableClass)
public POJOResourceFactory(ResourceBuilder resourceBuilder, Class<?> scannableClass)
public POJOResourceFactory(ResourceClass resourceClass)
public POJOResourceFactory(ResourceBuilder resourceBuilder, ResourceClass resourceClass)
public void registered(ResteasyProviderFactory factory)
ResourceFactory
registered
in interface ResourceFactory
factory
- allows singleton factories to pre-inject things like @Context references into the singleton instancepublic Object createResource(HttpRequest request, HttpResponse response, ResteasyProviderFactory factory)
ResourceFactory
createResource
in interface ResourceFactory
request
- http requestresponse
- http responsefactory
- provider factorypublic void unregistered()
unregistered
in interface ResourceFactory
public Class<?> getScannableClass()
ResourceFactory
getScannableClass
in interface ResourceFactory
public void requestFinished(HttpRequest request, HttpResponse response, Object resource)
ResourceFactory
requestFinished
in interface ResourceFactory
request
- http requestresponse
- http responseresource
- resourceCopyright © 2018 JBoss by Red Hat. All rights reserved.