Class POJOResourceFactory
java.lang.Object
org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory
- All Implemented Interfaces:
ResourceFactory
Allocates an instance of a class at each invocation
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Constructor Summary
ConstructorDescriptionPOJOResourceFactory
(Class<?> scannableClass) Deprecated.POJOResourceFactory
(ResourceBuilder resourceBuilder, Class<?> scannableClass) POJOResourceFactory
(ResourceBuilder resourceBuilder, ResourceClass resourceClass) POJOResourceFactory
(ResourceClass resourceClass) -
Method Summary
Modifier and TypeMethodDescriptioncreateResource
(HttpRequest request, HttpResponse response, ResteasyProviderFactory factory) Called per request to obtain a resource instance to invoke http request on.Class
<?> Class to scan for jax-rs annotationsvoid
registered
(ResteasyProviderFactory factory) Callback after registration has been completed.void
requestFinished
(HttpRequest request, HttpResponse response, Object resource) Callback when request is finished.void
-
Constructor Details
-
POJOResourceFactory
Deprecated. -
POJOResourceFactory
-
POJOResourceFactory
-
POJOResourceFactory
-
-
Method Details
-
registered
Description copied from interface:ResourceFactory
Callback after registration has been completed.- Specified by:
registered
in interfaceResourceFactory
- Parameters:
factory
- allows singleton factories to pre-inject things like @Context references into the singleton instance
-
createResource
public Object createResource(HttpRequest request, HttpResponse response, ResteasyProviderFactory factory) Description copied from interface:ResourceFactory
Called per request to obtain a resource instance to invoke http request on.- Specified by:
createResource
in interfaceResourceFactory
- Parameters:
request
- http requestresponse
- http responsefactory
- provider factory- Returns:
- resource object or a CompletionStage
-
unregistered
public void unregistered()- Specified by:
unregistered
in interfaceResourceFactory
-
getScannableClass
Description copied from interface:ResourceFactory
Class to scan for jax-rs annotations- Specified by:
getScannableClass
in interfaceResourceFactory
- Returns:
- class
-
requestFinished
Description copied from interface:ResourceFactory
Callback when request is finished. usable for things like @PreDestroy if the underlying factory supports it- Specified by:
requestFinished
in interfaceResourceFactory
- Parameters:
request
- http requestresponse
- http responseresource
- resource
-