public class ApplicationContextUtils extends Object
Modifier and Type | Method and Description |
---|---|
ApplicationContext |
getContext()
Get the application context.
|
ApplicationContext |
getContext(String locationHint)
Get the application context.
|
static ApplicationContextUtils |
getInstance()
Get an instance.
|
boolean |
isContextAvailable()
Check if the context has been loaded.
|
boolean |
isStarting()
Check if the context is starting.
|
void |
setContext(ApplicationContext context)
Set the application context.
|
void |
setStarting(boolean value)
Mark the context as starting.
|
void |
stop()
Stop the ApplicationContext.
|
@Nullable public ApplicationContext getContext()
@Nullable public ApplicationContext getContext(String locationHint)
getContext()
. The location can be
set through a Java system property. This method should normally be used for unit tests.locationHint
- a hint to the location of the context. Usually a classpath, file, or Java class implementing
Configuration.public static ApplicationContextUtils getInstance()
public boolean isContextAvailable()
public boolean isStarting()
public void setContext(ApplicationContext context)
I2RDApplicationEventMulticaster
context
- the context.public void setStarting(boolean value)
value
- the value.public void stop()