com.sun.ws.rest.spi.resource
Class ResourceProviderFactory
java.lang.Object
com.sun.ws.rest.spi.resource.ResourceProviderFactory
public class ResourceProviderFactory
- extends java.lang.Object
A singleton that manages access to resource provider instances.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResourceProviderFactory
public ResourceProviderFactory()
getInstance
public static ResourceProviderFactory getInstance()
createProvider
public ResourceProvider createProvider(ComponentProvider provider,
AbstractResource resource,
java.util.Map<java.lang.String,java.lang.Boolean> resourceFeatures,
java.util.Map<java.lang.String,java.lang.Object> resourceProperties)
- Obtain a ResourceProvider instance for the supplied
resourceClass.
This method will first search for a class that implements
ResourceProvider
that is declared as an annotation on
resourceClass.
If not found the the ResourceProvider
class will be looked up
in the resourceProperties using the property name
"com.sun.ws.rest.config.property.DefaultResourceProviderClass".
If there is no such property then the per-request resource provider
will be chosen.
- Parameters:
provider
- the component providerresource
- the abstract resource for the provider.resourceFeatures
- the resource featuresresourceProperties
- the resource properties
- Returns:
- the resource provider.
- Throws:
java.lang.IllegalArgumentException
- if the Java type of resource provider
property is not Class extends ResourceProvider>.