Class JndiResourceFactory
- java.lang.Object
-
- org.jboss.resteasy.plugins.server.resourcefactory.JndiResourceFactory
-
- All Implemented Interfaces:
ResourceFactory
public class JndiResourceFactory extends Object implements ResourceFactory
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Constructor Summary
Constructors Constructor Description JndiResourceFactory(String jndiName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 annotationsvoid
registered(ResteasyProviderFactory factory)
Callback after registration has been completed.void
requestFinished(HttpRequest request, HttpResponse response, Object resource)
Callback when request is finished.void
unregistered()
-
-
-
Constructor Detail
-
JndiResourceFactory
public JndiResourceFactory(String jndiName)
-
-
Method Detail
-
registered
public void registered(ResteasyProviderFactory factory)
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
public Class<?> getScannableClass()
Description copied from interface:ResourceFactory
Class to scan for jax-rs annotations- Specified by:
getScannableClass
in interfaceResourceFactory
- Returns:
- class
-
requestFinished
public void requestFinished(HttpRequest request, HttpResponse response, Object resource)
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
-
-