Package org.apache.cxf.jaxrs.lifecycle
Interface ResourceProvider
- All Known Implementing Classes:
PerRequestResourceProvider,SingletonResourceProvider,SpringResourceFactory
public interface ResourceProvider
ResourceProvider controls the life-cycle of the JAX-RS root resources.
-
Method Summary
Modifier and TypeMethodDescriptiongetInstance(org.apache.cxf.message.Message m) Returns the resource instance which will handle the current requestClass<?>Returns the Class of the resourcebooleanIndicates if the managed resource is a singletonvoidreleaseInstance(org.apache.cxf.message.Message m, Object o) Releases the resource instance if needed
-
Method Details
-
getInstance
Returns the resource instance which will handle the current request- Parameters:
m- the current request message- Returns:
- resource instance
-
releaseInstance
Releases the resource instance if needed- Parameters:
m- the current request messageo- resource instance
-
getResourceClass
Class<?> getResourceClass()Returns the Class of the resource- Returns:
-
isSingleton
boolean isSingleton()Indicates if the managed resource is a singleton- Returns:
-