|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.Uniform
org.restlet.Restlet
org.restlet.Finder
org.restlet.ext.spring.SpringFinder
org.restlet.ext.spring.SpringBeanFinder
public class SpringBeanFinder
An alternative to SpringFinder
which uses Spring's BeanFactory
mechanism to load a prototype bean by name.
Concurrency note: instances of this class or its subclasses can be invoked by
several threads at the same time and therefore must be thread-safe. You
should be especially careful when storing state in member variables.
Constructor Summary | |
---|---|
SpringBeanFinder()
Default constructor. |
|
SpringBeanFinder(BeanFactory beanFactory,
java.lang.String beanName)
Constructor. |
Method Summary | |
---|---|
Resource |
createResource()
Creates a new instance of the resource class designated by the "targetClass" property. |
BeanFactory |
getBeanFactory()
Returns the parent bean factory. |
java.lang.String |
getBeanName()
Returns the bean name. |
void |
setBeanFactory(BeanFactory beanFactory)
Sets the parent bean factory. |
void |
setBeanName(java.lang.String beanName)
Sets the bean name. |
Methods inherited from class org.restlet.ext.spring.SpringFinder |
---|
createTarget |
Methods inherited from class org.restlet.Finder |
---|
createResource, createTarget, findTarget, getTargetClass, handle, setTargetClass |
Methods inherited from class org.restlet.Restlet |
---|
getApplication, getContext, getLogger, init, isStarted, isStopped, setContext, start, stop |
Methods inherited from class org.restlet.Uniform |
---|
delete, delete, get, get, handle, head, head, options, options, post, post, put, put |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpringBeanFinder()
public SpringBeanFinder(BeanFactory beanFactory, java.lang.String beanName)
beanFactory
- The Spring bean factory.beanName
- The bean name.Method Detail |
---|
public Resource createResource()
SpringFinder
Finder.createResource(Request, Response)
method, by invoking the Resource.init(Context, Request, Response)
method on the resource.
createResource
in class SpringFinder
public BeanFactory getBeanFactory()
public java.lang.String getBeanName()
public void setBeanFactory(BeanFactory beanFactory)
setBeanFactory
in interface BeanFactoryAware
beanFactory
- The parent bean factory.public void setBeanName(java.lang.String beanName)
beanName
- The bean name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |