public class POJOResourceFactory extends Object implements ResourceFactory
Constructor and Description |
---|
POJOResourceFactory(Class<?> scannableClass) |
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() |
public POJOResourceFactory(Class<?> scannableClass)
public POJOResourceFactory(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
public 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
Copyright © 2014. All Rights Reserved.