org.powertac.visualizer
Class VisualizerApplicationContext
java.lang.Object
org.powertac.visualizer.VisualizerApplicationContext
- All Implemented Interfaces:
- org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
public class VisualizerApplicationContext
- extends Object
- implements org.springframework.context.ApplicationContextAware
|
Method Summary |
static Object |
getBean(String beanName)
This is about the same as context.getBean("beanName"), except it has its
own static handle to the Spring context, so calling this method
statically will give access to the beans by name in the Spring
application context. |
static
|
listBeansOfType(Class<T> type)
Returns all the Spring beans that are instances of the given type. |
void |
setApplicationContext(org.springframework.context.ApplicationContext context)
This method is called from within the ApplicationContext once it is done
starting up, it will stick a reference to itself into this bean. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VisualizerApplicationContext
public VisualizerApplicationContext()
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext context)
throws org.springframework.beans.BeansException
- This method is called from within the ApplicationContext once it is done
starting up, it will stick a reference to itself into this bean.
- Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
- Parameters:
context - a reference to the ApplicationContext.
- Throws:
org.springframework.beans.BeansException
getBean
public static Object getBean(String beanName)
- This is about the same as context.getBean("beanName"), except it has its
own static handle to the Spring context, so calling this method
statically will give access to the beans by name in the Spring
application context. As in the context.getBean("beanName") call, the
caller must cast to the appropriate target class. If the bean does not
exist, then a Runtime error will be thrown.
- Parameters:
beanName - the name of the bean to get.
- Returns:
- an Object reference to the named bean.
listBeansOfType
public static <T> List<T> listBeansOfType(Class<T> type)
- Returns all the Spring beans that are instances of the given type.
Copyright © 2013 Power TAC. All Rights Reserved.