org.jboss.resteasy.plugins.spring
Class SpringBeanProcessor

java.lang.Object
  extended by org.jboss.resteasy.plugins.spring.SpringBeanProcessor
All Implemented Interfaces:
org.springframework.beans.factory.config.BeanFactoryPostProcessor
Direct Known Subclasses:
SpringBeanProcessorServletAware

public class SpringBeanProcessor
extends java.lang.Object
implements org.springframework.beans.factory.config.BeanFactoryPostProcessor

The processor will register any bean annotated with @Path or @Provider into the Resteasy framework.

It also sets up Registry and ResteasyProviderFactory to be autowirable.

Note: This class will have undesirable affects if you are doing handcoded proxying with Spring, i.e., with ProxyFactoryBean. If you are using auto-proxied beans, you will be ok.

Version:
$Revision: 1 $
Author:
Bill Burke

Nested Class Summary
protected  class SpringBeanProcessor.ResteasyBeanPostProcessor
           
 
Field Summary
protected  Dispatcher dispatcher
           
protected  ResteasyProviderFactory providerFactory
           
protected  Registry registry
           
protected  java.util.Map<java.lang.String,SpringResourceFactory> resourceFactories
           
 
Constructor Summary
SpringBeanProcessor()
           
SpringBeanProcessor(Dispatcher dispatcher)
           
SpringBeanProcessor(Dispatcher dispatcher, Registry registry, ResteasyProviderFactory providerFactory)
           
SpringBeanProcessor(Registry registry, ResteasyProviderFactory providerFactory)
          Deprecated. 
 
Method Summary
 Dispatcher getDispatcher()
           
 ResteasyProviderFactory getProviderFactory()
           
 Registry getRegistry()
           
 void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
           
 void setDispatcher(Dispatcher dispatcher)
           
 void setProviderFactory(ResteasyProviderFactory providerFactory)
           
 void setRegistry(Registry registry)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

registry

protected Registry registry

providerFactory

protected ResteasyProviderFactory providerFactory

dispatcher

protected Dispatcher dispatcher

resourceFactories

protected java.util.Map<java.lang.String,SpringResourceFactory> resourceFactories
Constructor Detail

SpringBeanProcessor

public SpringBeanProcessor(Dispatcher dispatcher)

SpringBeanProcessor

public SpringBeanProcessor(Dispatcher dispatcher,
                           Registry registry,
                           ResteasyProviderFactory providerFactory)

SpringBeanProcessor

@Deprecated
public SpringBeanProcessor(Registry registry,
                                      ResteasyProviderFactory providerFactory)
Deprecated. 


SpringBeanProcessor

public SpringBeanProcessor()
Method Detail

getRegistry

public Registry getRegistry()

setRegistry

public void setRegistry(Registry registry)

getProviderFactory

public ResteasyProviderFactory getProviderFactory()

setProviderFactory

public void setProviderFactory(ResteasyProviderFactory providerFactory)

getDispatcher

public Dispatcher getDispatcher()

setDispatcher

public void setDispatcher(Dispatcher dispatcher)

postProcessBeanFactory

public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
                            throws org.springframework.beans.BeansException
Specified by:
postProcessBeanFactory in interface org.springframework.beans.factory.config.BeanFactoryPostProcessor
Throws:
org.springframework.beans.BeansException


Copyright © 2009. All Rights Reserved.