edu.uoc.tfc
Class BeanLocator

java.lang.Object
  extended by edu.uoc.tfc.BeanLocator

public class BeanLocator
extends java.lang.Object

Provides lookup for Spring beans


Field Summary
static java.lang.String BEAN_PREFIX
          The prefix used for all bean ids.
 
Method Summary
 java.lang.Object getBean(java.lang.String name)
          Retrieve the bean with the given name.
 org.springframework.context.ApplicationContext getContext()
          Gets the Spring ApplicationContext.
 void init()
          Initializes the Spring application context from the default settings.
 void init(java.lang.String beanFactoryReferenceLocation)
          Initializes the Spring application context from the given beanFactoryReferenceLocation.
 void init(java.lang.String beanFactoryReferenceLocation, java.lang.String beanRefFactoryReferenceId)
          Initializes the Spring application context from the given beanFactoryReferenceLocation.
static BeanLocator instance()
          Gets the shared instance of this Class
 void shutdown()
          Shuts down the BeanLocator and releases any used resources.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEAN_PREFIX

public static final java.lang.String BEAN_PREFIX
The prefix used for all bean ids.

See Also:
Constant Field Values
Method Detail

instance

public static final BeanLocator instance()
Gets the shared instance of this Class

Returns:
the shared bean locator instance.

init

public void init()
Initializes the Spring application context from the default settings.


init

public void init(java.lang.String beanFactoryReferenceLocation,
                 java.lang.String beanRefFactoryReferenceId)
Initializes the Spring application context from the given beanFactoryReferenceLocation. If null is specified for the beanFactoryReferenceLocation then the default application context will be used.

Parameters:
beanFactoryReferenceLocation - the location of the beanRefFactory reference.

init

public void init(java.lang.String beanFactoryReferenceLocation)
Initializes the Spring application context from the given beanFactoryReferenceLocation. If null is specified for the beanFactoryReferenceLocation then the default application context will be used.

Parameters:
beanFactoryReferenceLocation - the location of the beanRefFactory reference.

getContext

public org.springframework.context.ApplicationContext getContext()
Gets the Spring ApplicationContext.


shutdown

public void shutdown()
Shuts down the BeanLocator and releases any used resources.


getBean

public java.lang.Object getBean(java.lang.String name)
Retrieve the bean with the given name.