Apache CXF API

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
 Object getInstance(Message m)
          Returns the resource instance which will handle the current request
 Class<?> getResourceClass()
          Returns the Class of the resource
 boolean isSingleton()
          Indicates if the managed resource is a singleton
 void releaseInstance(Message m, Object o)
          Releases the resource instance if needed
 

Method Detail

getInstance

Object getInstance(Message m)
Returns the resource instance which will handle the current request

Parameters:
m - the current request message
Returns:
resource instance

releaseInstance

void releaseInstance(Message m,
                     Object o)
Releases the resource instance if needed

Parameters:
m - the current request message
o - resource instance

getResourceClass

Class<?> getResourceClass()
Returns the Class of the resource

Returns:

isSingleton

boolean isSingleton()
Indicates if the managed resource is a singleton

Returns:

Apache CXF API

Apache CXF