com.sun.jersey.api.core
Interface ResourceContext
public interface ResourceContext
The resource context provides access to instances of specified
resource classes (dependencies).
It can be injected into resource and provider classes using the Context
annotation.
Created on: Apr 4, 2008
Method Summary |
|
getResource(java.lang.Class<T> c)
Provides an instance of the given resource class. |
getResource
<T> T getResource(java.lang.Class<T> c)
throws ContainerException
- Provides an instance of the given resource class.
- Type Parameters:
T
- the type of the resource class- Parameters:
c
- the resource class
- Returns:
- an instance if it could be resolved, otherwise null.
- Throws:
ContainerException
- if the resource
class cannot be found.