com.sun.jersey.server.impl.resource
Class SingletonFactory

java.lang.Object
  extended by com.sun.jersey.server.impl.resource.SingletonFactory
All Implemented Interfaces:
ComponentProviderFactory<ResourceComponentProvider>, ResourceComponentProviderFactory

public final class SingletonFactory
extends Object
implements ResourceComponentProviderFactory

A simple provider that maintains a singleton resource class instance


Constructor Summary
SingletonFactory(ServerInjectableProviderContext sipc)
           
 
Method Summary
 ResourceComponentProvider getComponentProvider(Class c)
          Get the component provider for a class.
 ResourceComponentProvider getComponentProvider(IoCComponentProvider icp, Class c)
          Get the resource class component provider.
 ComponentScope getScope(Class c)
          Get the scope of the resource class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingletonFactory

public SingletonFactory(@Context
                        ServerInjectableProviderContext sipc)
Method Detail

getScope

public ComponentScope getScope(Class c)
Description copied from interface: ResourceComponentProviderFactory
Get the scope of the resource class.

Specified by:
getScope in interface ResourceComponentProviderFactory
Parameters:
c - the resource class.
Returns:
the scope.

getComponentProvider

public ResourceComponentProvider getComponentProvider(Class c)
Description copied from interface: ComponentProviderFactory
Get the component provider for a class.

Specified by:
getComponentProvider in interface ComponentProviderFactory<ResourceComponentProvider>
Parameters:
c - the class
Returns:
the component provider for the class

getComponentProvider

public ResourceComponentProvider getComponentProvider(IoCComponentProvider icp,
                                                      Class c)
Description copied from interface: ResourceComponentProviderFactory
Get the resource class component provider.

Specified by:
getComponentProvider in interface ResourceComponentProviderFactory
Parameters:
icp - the underlying IoC component provider.
c - the resource class
Returns:
the resource class component provider.


Copyright © 2013 Oracle Corporation. All Rights Reserved.