|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.red5.server.ContextLoader
public class ContextLoader
Red5 applications loader
Field Summary | |
---|---|
protected ApplicationContext |
applicationContext
Spring Application context |
protected ConcurrentMap<String,ApplicationContext> |
contextMap
Context map |
protected String |
contextsConfig
Context location files |
protected static Logger |
log
|
protected ApplicationContext |
parentContext
Spring parent app context |
Constructor Summary | |
---|---|
ContextLoader()
|
Method Summary | |
---|---|
ApplicationContext |
getContext(String name)
Return context by name |
String |
getContextsConfig()
|
ApplicationContext |
getParentContext()
Return parent context |
void |
init()
Loads context settings from ResourceBundle (.properties file) |
boolean |
isUseShutdownHook()
Whether or not the shutdown hook is enabled. |
void |
loadContext(String name,
String config)
Loads a context (Red5 application) and stores it in a context map, then adds it's beans to parent (that is, Red5) |
void |
setApplicationContext(ApplicationContext applicationContext)
|
void |
setContextsConfig(String contextsConfig)
Setter for context config name |
void |
setParentContext(ApplicationContext parentContext)
Setter for parent application context |
void |
setUseShutdownHook(boolean useShutdownHook)
Enables or disables the shutdown hook. |
void |
uninit()
Un-loads or un-initializes the contexts; this is a shutdown method for this loader. |
void |
unloadContext(String name)
Unloads a context (Red5 application) and removes it from the context map, then removes it's beans from the parent (that is, Red5) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Logger log
protected ApplicationContext applicationContext
protected ApplicationContext parentContext
protected String contextsConfig
protected ConcurrentMap<String,ApplicationContext> contextMap
Constructor Detail |
---|
public ContextLoader()
Method Detail |
---|
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext
in interface ApplicationContextAware
applicationContext
- Spring application context
BeansException
- Top level exception for app context (that is, in fact, beans
factory)public void setParentContext(ApplicationContext parentContext)
parentContext
- Parent Spring application contextpublic void setContextsConfig(String contextsConfig)
setContextsConfig
in interface ContextLoaderMBean
contextsConfig
- Context config namepublic boolean isUseShutdownHook()
public void setUseShutdownHook(boolean useShutdownHook)
useShutdownHook
- true to enable, false to disablepublic void init() throws Exception
init
in interface ContextLoaderMBean
Exception
- I/O exception, casting exception and otherspublic void uninit()
uninit
in interface ContextLoaderMBean
public void loadContext(String name, String config)
loadContext
in interface ContextLoaderMBean
name
- Context nameconfig
- Filenamepublic void unloadContext(String name)
unloadContext
in interface ContextLoaderMBean
name
- Context namepublic ApplicationContext getContext(String name)
getContext
in interface ContextLoaderMBean
name
- Context name
public ApplicationContext getParentContext()
getParentContext
in interface ContextLoaderMBean
public String getContextsConfig()
getContextsConfig
in interface ContextLoaderMBean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |