Package org.apache.cxf.jaxrs.lifecycle
Class SingletonResourceProvider
java.lang.Object
org.apache.cxf.jaxrs.lifecycle.SingletonResourceProvider
- All Implemented Interfaces:
ResourceProvider
The default singleton resource provider which returns
the same resource instance per every request
-
Constructor Summary
Constructors -
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 resourcevoidinit(org.apache.cxf.endpoint.Endpoint ep) booleanIndicates if the managed resource is a singletonvoidreleaseInstance(org.apache.cxf.message.Message m, Object o) Releases the resource instance if needed
-
Constructor Details
-
SingletonResourceProvider
-
SingletonResourceProvider
-
-
Method Details
-
init
public void init(org.apache.cxf.endpoint.Endpoint ep) -
isSingleton
public boolean isSingleton()Indicates if the managed resource is a singleton- Specified by:
isSingletonin interfaceResourceProvider- Returns:
-
getInstance
Returns the resource instance which will handle the current request- Specified by:
getInstancein interfaceResourceProvider- Parameters:
m- the current request message- Returns:
- resource instance
-
releaseInstance
Releases the resource instance if needed- Specified by:
releaseInstancein interfaceResourceProvider- Parameters:
m- the current request messageo- resource instance
-
getResourceClass
Returns the Class of the resource- Specified by:
getResourceClassin interfaceResourceProvider- Returns:
-