|
||||||||||
| 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 org.slf4j.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(org.springframework.context.ApplicationContext context,
String contextPath)
Initializes app context and context path from given parameters |
|
| Method Summary | |
|---|---|
static Context |
from(CompositeData cd)
Allows for reconstruction via CompositeData. |
org.springframework.context.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 |
org.springframework.core.io.Resource |
getResource(String path)
Return resouce by path |
org.springframework.core.io.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(org.springframework.context.ApplicationContext context)
Setter for application context |
void |
setClientRegistry(IClientRegistry clientRegistry)
Setter for client registry |
void |
setContextPath(String contextPath)
Setter for context path. |
void |
setCoreBeanFactory(org.springframework.beans.factory.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 org.slf4j.Logger logger
| Constructor Detail |
|---|
@ConstructorProperties(value="") public Context()
@ConstructorProperties(value={"context","contextPath"})
public Context(org.springframework.context.ApplicationContext context,
String contextPath)
context - Application contextcontextPath - Context path| Method Detail |
|---|
public IGlobalScope getGlobalScope()
getGlobalScope in interface IContextgetGlobalScope in interface ContextMXBeanpublic IScopeResolver getScopeResolver()
public IScope resolveScope(String path)
resolveScope in interface IContextresolveScope in interface ContextMXBeanpath - Path to resolve
public IScope resolveScope(IScope root,
String path)
resolveScope in interface IContextresolveScope in interface ContextMXBeanroot - 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 ContextMXBeanpublic void setPersistanceStore(IPersistenceStore persistanceStore)
persistanceStore - Persistence storepublic void setApplicationContext(org.springframework.context.ApplicationContext context)
setApplicationContext in interface org.springframework.context.ApplicationContextAwarecontext - App contextpublic org.springframework.context.ApplicationContext getApplicationContext()
getApplicationContext in interface IContextgetApplicationContext in interface ContextMXBeanpublic void setContextPath(String contextPath)
setContextPath in interface ContextMXBeancontextPath - Context pathpublic IClientRegistry getClientRegistry()
getClientRegistry in interface IContextgetClientRegistry in interface ContextMXBeanpublic IScope getScope()
getScope in interface ContextMXBeanpublic IServiceInvoker getServiceInvoker()
getServiceInvoker in interface IContextgetServiceInvoker in interface ContextMXBeanpublic Object lookupService(String serviceName)
lookupService in interface IContextlookupService in interface ContextMXBeanserviceName - Service name
ServiceNotFoundException - When service found but null
org.springframework.beans.factory.NoSuchBeanDefinitionException - When bean with given name doesn't existpublic IScopeHandler lookupScopeHandler(String contextPath)
lookupScopeHandler in interface IContextlookupScopeHandler in interface ContextMXBeancontextPath - Context path
ScopeHandlerNotFoundException - If there's no handler for given context pathpublic IMappingStrategy getMappingStrategy()
getMappingStrategy in interface IContextgetMappingStrategy in interface ContextMXBean
public org.springframework.core.io.Resource[] getResources(String pattern)
throws IOException
getResources in interface ContextMXBeangetResources in interface org.springframework.core.io.support.ResourcePatternResolverpattern - Pattern to check against
IOException - On I/O exceptionResourcepublic org.springframework.core.io.Resource getResource(String path)
getResource in interface ContextMXBeangetResource in interface org.springframework.core.io.ResourceLoaderpath - Resource path
Resource
public IScope resolveScope(String host,
String path)
resolveScope in interface ContextMXBeanhost - 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 ContextMXBeanbeanId - Bean name
BeanFactorypublic Object getCoreService(String beanId)
getCoreService in interface IContextgetCoreService in interface ContextMXBeanbeanId - Bean name
BeanFactorypublic void setCoreBeanFactory(org.springframework.beans.factory.BeanFactory core)
public ClassLoader getClassLoader()
getClassLoader in interface org.springframework.core.io.ResourceLoaderpublic static Context from(CompositeData cd)
cd - composite data
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||