public class Context extends Object implements org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener
| Modifier and Type | Method and Description |
|---|---|
static void |
addListener(SystemEvent evt)
Adds an Listener to a particular Event given from
|
Object |
getBean(Class clazz)
Retrieves a bean registered in the Spring context using a class name.
|
Object |
getBean(String id)
Retrieves a bean registered in the Spring context.
|
List<Object> |
getBeansOfType(Class clazz)
Retrieves the list of bean of the same type
|
static Context |
getInstance() |
org.springframework.core.io.Resource |
getResource(String resourceLocation)
Returns a Spring-Resource
|
org.springframework.core.io.Resource[] |
getResources(String resourcePattern) |
void |
onApplicationEvent(org.springframework.context.ApplicationEvent event)
Processes a newly incoming event on appropriated events that registered
itself on it
|
static void |
refresh()
Reloads the Spring application context.
|
static void |
removeListener(SystemEvent evt)
Removes a particular Listener from the list
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public static Context getInstance()
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic Object getBean(String id)
id - The bean identifierpublic List<Object> getBeansOfType(Class clazz)
public Object getBean(Class clazz)
clazz - The bean identifier as class namepublic static void refresh()
NOTE: use carefully, invoke only during setup when the config.xml is changed
public static void addListener(SystemEvent evt)
evt - SystemEvent#getSystemStatus()}public static void removeListener(SystemEvent evt)
evt - public org.springframework.core.io.Resource[] getResources(String resourcePattern)
public org.springframework.core.io.Resource getResource(String resourceLocation)
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
onApplicationEvent in interface org.springframework.context.ApplicationListenerCopyright © 2008-2014 Logical Objects. All Rights Reserved.