|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.red5.server.Server
public class Server
Red5 server core class implementation.
Field Summary | |
---|---|
protected org.springframework.context.ApplicationContext |
applicationContext
Spring application context |
Set<IConnectionListener> |
connectionListeners
|
protected static String |
EMPTY
Constant for empty string |
protected ConcurrentMap<String,IGlobalScope> |
globals
List of global scopes |
protected static org.slf4j.Logger |
log
|
protected ConcurrentMap<String,String> |
mapping
Mappings |
Set<IScopeListener> |
scopeListeners
|
protected static String |
SLASH
Constant for slash |
Fields inherited from interface org.red5.server.api.IServer |
---|
ID |
Constructor Summary | |
---|---|
Server()
|
Method Summary | |
---|---|
void |
addListener(IConnectionListener listener)
Add listener to get notified about connection events. |
void |
addListener(IScopeListener listener)
Add listener to get notified about scope events. |
boolean |
addMapping(String hostName,
String contextPath,
String globalName)
Map key (host + / + context path) and global scope name |
void |
afterPropertiesSet()
Initialization section. |
void |
destroy()
Destruction section. |
IGlobalScope |
getGlobal(String name)
Return global scope by name |
Iterator<String> |
getGlobalNames()
Return global scope names set iterator |
Iterator<IGlobalScope> |
getGlobalScopes()
Return global scopes set iterator |
protected String |
getKey(String hostName,
String contextPath)
Return scope key. |
Map<String,String> |
getMappingTable()
Return mapping |
int |
getNotifierThreadPoolSize()
|
IGlobalScope |
lookupGlobal(String hostName,
String contextPath)
Does global scope lookup for host name and context path |
protected void |
notifyConnected(IConnection conn)
Notify listeners that a new connection was established. |
protected void |
notifyDisconnected(IConnection conn)
Notify listeners that a connection was disconnected. |
protected void |
notifyScopeCreated(IScope scope)
Notify listeners about a newly created scope. |
protected void |
notifyScopeRemoved(IScope scope)
Notify listeners that a scope was removed. |
void |
registerGlobal(IGlobalScope scope)
Register global scope |
void |
removeListener(IConnectionListener listener)
Remove listener that got notified about connection events. |
void |
removeListener(IScopeListener listener)
Remove listener that got notified about scope events. |
boolean |
removeMapping(String contextPath)
Remove all mappings with given context path |
boolean |
removeMapping(String hostName,
String contextPath)
Remove mapping with given key |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Setter for Spring application context |
void |
setNotifierThreadPoolSize(int notifierThreadPoolSize)
|
String |
toString()
String representation of server |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static org.slf4j.Logger log
protected ConcurrentMap<String,IGlobalScope> globals
protected ConcurrentMap<String,String> mapping
protected org.springframework.context.ApplicationContext applicationContext
protected static final String SLASH
protected static final String EMPTY
public Set<IScopeListener> scopeListeners
public Set<IConnectionListener> connectionListeners
Constructor Detail |
---|
public Server()
Method Detail |
---|
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
applicationContext
- Application contextpublic void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public void destroy() throws Exception
destroy
in interface org.springframework.beans.factory.DisposableBean
Exception
protected String getKey(String hostName, String contextPath)
hostName
- Host namecontextPath
- Context path
public IGlobalScope lookupGlobal(String hostName, String contextPath)
lookupGlobal
in interface IServer
hostName
- Host namecontextPath
- Context path
public IGlobalScope getGlobal(String name)
getGlobal
in interface IServer
name
- Global scope name
public void registerGlobal(IGlobalScope scope)
registerGlobal
in interface IServer
scope
- Global scope to registerpublic boolean addMapping(String hostName, String contextPath, String globalName)
addMapping
in interface IServer
hostName
- Host namecontextPath
- Context pathglobalName
- Global scope name
public boolean removeMapping(String hostName, String contextPath)
removeMapping
in interface IServer
hostName
- Host namecontextPath
- Context path
public boolean removeMapping(String contextPath)
contextPath
- Context path
public Map<String,String> getMappingTable()
getMappingTable
in interface IServer
public Iterator<String> getGlobalNames()
getGlobalNames
in interface IServer
public Iterator<IGlobalScope> getGlobalScopes()
getGlobalScopes
in interface IServer
public String toString()
toString
in class Object
public void addListener(IScopeListener listener)
addListener
in interface IServer
listener
- the listener to addpublic void addListener(IConnectionListener listener)
addListener
in interface IServer
listener
- the listener to addpublic void removeListener(IScopeListener listener)
removeListener
in interface IServer
listener
- the listener to removepublic void removeListener(IConnectionListener listener)
removeListener
in interface IServer
listener
- the listener to removeprotected void notifyScopeCreated(IScope scope)
scope
- the scope that was createdprotected void notifyScopeRemoved(IScope scope)
scope
- the scope that was removedprotected void notifyConnected(IConnection conn)
conn
- the new connectionprotected void notifyDisconnected(IConnection conn)
conn
- the disconnected connectionpublic int getNotifierThreadPoolSize()
public void setNotifierThreadPoolSize(int notifierThreadPoolSize)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |