com.sun.jersey.spi.spring.container
Class SpringComponentProviderFactory

java.lang.Object
  extended by com.sun.jersey.spi.spring.container.SpringComponentProviderFactory
All Implemented Interfaces:
ComponentProviderFactory<IoCComponentProvider>, IoCComponentProviderFactory

public class SpringComponentProviderFactory
extends java.lang.Object
implements IoCComponentProviderFactory

The Spring-based IoCComponentProviderFactory.

Resource and provider classes can be registered Spring-based beans using XML-based registration or auto-wire-based registration.

Author:
Paul.Sandoz@Sun.Com

Constructor Summary
SpringComponentProviderFactory(ResourceConfig rc, org.springframework.context.ConfigurableApplicationContext springContext)
           
 
Method Summary
 IoCComponentProvider getComponentProvider(java.lang.Class c)
          Get the IoC component provider for a class.
 IoCComponentProvider getComponentProvider(ComponentContext cc, java.lang.Class c)
          Get the IoC component provider for a class with additional context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringComponentProviderFactory

public SpringComponentProviderFactory(ResourceConfig rc,
                                      org.springframework.context.ConfigurableApplicationContext springContext)
Method Detail

getComponentProvider

public IoCComponentProvider getComponentProvider(java.lang.Class c)
Description copied from interface: IoCComponentProviderFactory
Get the IoC component provider for a class.

Specified by:
getComponentProvider in interface ComponentProviderFactory<IoCComponentProvider>
Specified by:
getComponentProvider in interface IoCComponentProviderFactory
Parameters:
c - the class
Returns:
the IoC component provider for the class, otherwise null if the class is not supported.

getComponentProvider

public IoCComponentProvider getComponentProvider(ComponentContext cc,
                                                 java.lang.Class c)
Description copied from interface: IoCComponentProviderFactory
Get the IoC component provider for a class with additional context.

The additional context will be associated with the annotations and optionally an annotated object. For example, a component provider may be requested for a class that is the type of a Field, or be requested for a class that is the type of a method parameter.

Specified by:
getComponentProvider in interface IoCComponentProviderFactory
Parameters:
cc - the component context to obtain annotations and the annotated object (if present).
c - the class
Returns:
the IoC component provider for the class, otherwise null if the class is not supported.


Copyright © 2011 Sun Microsystems, Inc. All Rights Reserved.