|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.red5.server.Context
public class Context
This is basic context implementation used by Red5.
| Field Summary | |
|---|---|
static Logger |
logger
|
| Fields inherited from interface org.red5.server.api.IContext |
|---|
ID |
| Fields inherited from interface org.springframework.core.io.support.ResourcePatternResolver |
|---|
CLASSPATH_ALL_URL_PREFIX |
| Fields inherited from interface org.springframework.core.io.ResourceLoader |
|---|
CLASSPATH_URL_PREFIX |
| Constructor Summary | |
|---|---|
Context()
Initializes core context bean factory using red5.core bean factory from red5.xml context |
|
Context(ApplicationContext context,
String contextPath)
Initializes app context and context path from given parameters |
|
| Method Summary | |
|---|---|
ApplicationContext |
getApplicationContext()
Return application context |
Object |
getBean(String beanId)
Return bean instantiated by bean factory |
ClassLoader |
getClassLoader()
Return current thread's context classloader |
IClientRegistry |
getClientRegistry()
Return client registry |
Object |
getCoreService(String beanId)
Return core Red5 service instantiated by core context bean factory |
IGlobalScope |
getGlobalScope()
Return global scope |
IMappingStrategy |
getMappingStrategy()
Return mapping strategy used by this context. |
IPersistenceStore |
getPersistanceStore()
Return persistence store |
Resource |
getResource(String path)
Return resouce by path |
Resource[] |
getResources(String pattern)
Return array or resournce that match given pattern |
IScope |
getScope()
Return scope |
IScopeResolver |
getScopeResolver()
Return scope resolver |
IServiceInvoker |
getServiceInvoker()
Return service invoker |
boolean |
hasBean(String beanId)
Returns true if the context contains a certain bean, false otherwise. |
IScopeHandler |
lookupScopeHandler(String contextPath)
Look up scope handler for context path |
Object |
lookupService(String serviceName)
Look up service by name |
IScope |
resolveScope(IScope root,
String path)
Resolves scope from given root using scope resolver. |
IScope |
resolveScope(String path)
Resolves scope using scope resolver collaborator |
IScope |
resolveScope(String host,
String path)
Resolve scope from host and path |
void |
setApplicationContext(ApplicationContext context)
Setter for application context |
void |
setClientRegistry(IClientRegistry clientRegistry)
Setter for client registry |
void |
setContextPath(String contextPath)
Setter for context path. |
void |
setCoreBeanFactory(BeanFactory core)
|
void |
setMappingStrategy(IMappingStrategy mappingStrategy)
Setter for mapping strategy |
void |
setPersistanceStore(IPersistenceStore persistanceStore)
Setter for persistence store |
void |
setScopeResolver(IScopeResolver scopeResolver)
Setter for scope resolver |
void |
setServiceInvoker(IServiceInvoker serviceInvoker)
Setter for service invoker |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static Logger logger
| Constructor Detail |
|---|
public Context()
public Context(ApplicationContext context,
String contextPath)
context - Application contextcontextPath - Context path| Method Detail |
|---|
public IGlobalScope getGlobalScope()
getGlobalScope in interface IContextgetGlobalScope in interface ContextMBeanpublic IScopeResolver getScopeResolver()
public IScope resolveScope(String path)
resolveScope in interface IContextresolveScope in interface ContextMBeanpath - Path to resolve
public IScope resolveScope(IScope root,
String path)
resolveScope in interface IContextresolveScope in interface ContextMBeanroot - Scope to start from.path - Path to resolve.
public void setClientRegistry(IClientRegistry clientRegistry)
clientRegistry - Client registrypublic void setMappingStrategy(IMappingStrategy mappingStrategy)
mappingStrategy - Mapping strategypublic void setScopeResolver(IScopeResolver scopeResolver)
scopeResolver - Scope resolver used to resolve scopespublic void setServiceInvoker(IServiceInvoker serviceInvoker)
serviceInvoker - Service invoker objectpublic IPersistenceStore getPersistanceStore()
getPersistanceStore in interface IContextgetPersistanceStore in interface ContextMBeanpublic void setPersistanceStore(IPersistenceStore persistanceStore)
persistanceStore - Persistence storepublic void setApplicationContext(ApplicationContext context)
setApplicationContext in interface ApplicationContextAwarecontext - App contextpublic ApplicationContext getApplicationContext()
getApplicationContext in interface IContextgetApplicationContext in interface ContextMBeanpublic void setContextPath(String contextPath)
setContextPath in interface ContextMBeancontextPath - Context pathpublic IClientRegistry getClientRegistry()
getClientRegistry in interface IContextgetClientRegistry in interface ContextMBeanpublic IScope getScope()
getScope in interface ContextMBeanpublic IServiceInvoker getServiceInvoker()
getServiceInvoker in interface IContextgetServiceInvoker in interface ContextMBeanpublic Object lookupService(String serviceName)
lookupService in interface IContextlookupService in interface ContextMBeanserviceName - Service name
ServiceNotFoundException - When service found but null
NoSuchBeanDefinitionException - When bean with given name doesn't existpublic IScopeHandler lookupScopeHandler(String contextPath)
lookupScopeHandler in interface IContextlookupScopeHandler in interface ContextMBeancontextPath - Context path
ScopeHandlerNotFoundException - If there's no handler for given context pathpublic IMappingStrategy getMappingStrategy()
getMappingStrategy in interface IContextgetMappingStrategy in interface ContextMBean
public Resource[] getResources(String pattern)
throws IOException
getResources in interface ContextMBeangetResources in interface ResourcePatternResolverpattern - Pattern to check against
IOException - On I/O exceptionResourcepublic Resource getResource(String path)
getResource in interface ContextMBeangetResource in interface ResourceLoaderpath - Resource path
Resource
public IScope resolveScope(String host,
String path)
resolveScope in interface ContextMBeanhost - Hostpath - Path
IScope,
Scopepublic boolean hasBean(String beanId)
hasBean in interface IContextbeanId - The name of the bean to find.
public Object getBean(String beanId)
getBean in interface IContextgetBean in interface ContextMBeanbeanId - Bean name
BeanFactorypublic Object getCoreService(String beanId)
getCoreService in interface IContextgetCoreService in interface ContextMBeanbeanId - Bean name
BeanFactorypublic void setCoreBeanFactory(BeanFactory core)
public ClassLoader getClassLoader()
getClassLoader in interface ResourceLoader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||