|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IScope
The scope object. A stateful object shared between a group of clients connected to the same context path. Scopes are arranged in hierarchical way, so its possible for a scope to have a parent and children scopes. If a client connects to a scope then they are also connected to its parent scope. The scope object is used to access resources, shared object, streams, etc. That is, scope are general option for grouping things in application. The following are all names for scopes: application, room, place, lobby.
Field Summary | |
---|---|
static String |
SEPARATOR
Scope separator |
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 |
Method Summary | |
---|---|
boolean |
addChildScope(IBasicScope scope)
Adds scope as a child scope. |
boolean |
connect(IConnection conn)
Adds given connection to the scope |
boolean |
connect(IConnection conn,
Object[] params)
Add given connection to the scope, overloaded for parameters pass case. |
boolean |
createChildScope(String name)
Creates child scope with name given and returns success value. |
void |
disconnect(IConnection conn)
Removes given connection from list of scope connections. |
Object |
getAttribute(String name)
Get attribute by name |
Set<String> |
getAttributeNames()
Return attribute names |
Map<String,Object> |
getAttributes()
Return scope attributes |
IBasicScope |
getBasicScope(ScopeType type,
String name)
Get a child scope by type and name. |
Set<String> |
getBasicScopeNames(ScopeType type)
|
IBroadcastScope |
getBroadcastScope(String name)
Return the broadcast scope for a given name |
Set<IClient> |
getClients()
Get a set of connected clients. |
Collection<Set<IConnection>> |
getConnections()
Get a connection iterator. |
IContext |
getContext()
Returns scope context |
String |
getContextPath()
Return context path. |
IScopeHandler |
getHandler()
Return handler of the scope |
IScope |
getScope(String name)
Return scope by name |
Set<String> |
getScopeNames()
Get a set of the child scope names. |
IScopeStatistics |
getStatistics()
Return statistics informations about the scope. |
boolean |
hasAttribute(String name)
Whether or not an attribute exists, keyed by the given name |
boolean |
hasChildScope(ScopeType type,
String name)
Checks whether scope has a child scope with given name and type |
boolean |
hasChildScope(String name)
Check to see if this scope has a child scope matching a given name. |
boolean |
hasHandler()
Checks whether scope has handler or not. |
Set<IConnection> |
lookupConnections(IClient client)
Lookup connections. |
boolean |
removeAttribute(String name)
Remove attribute by name |
void |
removeChildren()
Removes all the child scopes |
void |
removeChildScope(IBasicScope scope)
Removes scope from the children scope list. |
boolean |
setAttribute(String name,
Object value)
Set attribute by name |
Methods inherited from interface org.red5.server.api.scope.IBasicScope |
---|
getDepth, getName, getParent, getPath, getStore, getType, hasParent, isValid, setKeepDelay |
Methods inherited from interface org.red5.server.api.event.IEventDispatcher |
---|
dispatchEvent |
Methods inherited from interface org.red5.server.api.event.IEventHandler |
---|
handleEvent |
Methods inherited from interface org.red5.server.api.event.IEventListener |
---|
notifyEvent |
Methods inherited from interface org.red5.server.api.event.IEventObservable |
---|
addEventListener, getEventListeners, removeEventListener |
Methods inherited from interface org.springframework.core.io.support.ResourcePatternResolver |
---|
getResources |
Methods inherited from interface org.springframework.core.io.ResourceLoader |
---|
getClassLoader, getResource |
Methods inherited from interface org.red5.server.api.service.IServiceHandlerProvider |
---|
getServiceHandler, getServiceHandlerNames, registerServiceHandler, unregisterServiceHandler |
Field Detail |
---|
static final String SEPARATOR
Method Detail |
---|
boolean hasChildScope(String name)
name
- the name of the child scope
true
if a child scope exists, otherwise
false
boolean hasChildScope(ScopeType type, String name)
type
- Child scope typename
- Child scope name
true
if a child scope exists, otherwise
false
boolean createChildScope(String name)
true
on success, false
if given scope
already exists among children.
name
- New child scope name
true
if child scope was successfully creates,
false
otherwiseboolean addChildScope(IBasicScope scope)
true
on success,
false
if given scope is already a child of current.
scope
- Scope given
true
if child scope was successfully added,
false
otherwisevoid removeChildScope(IBasicScope scope)
scope
- Scope givenvoid removeChildren()
Set<String> getScopeNames()
Set<String> getBasicScopeNames(ScopeType type)
IBroadcastScope getBroadcastScope(String name)
name
-
IBasicScope getBasicScope(ScopeType type, String name)
type
- Child scope typename
- Name of the child scope
IScope getScope(String name)
name
- Scope name
Set<IClient> getClients()
IClient.getConnections()
method.
IClient.getConnections(IScope)
Collection<Set<IConnection>> getConnections()
Set<IConnection> lookupConnections(IClient client)
client
- object
IContext getContext()
boolean hasHandler()
true
if scope has a handler, false
otherwiseIScopeHandler getHandler()
String getContextPath()
boolean connect(IConnection conn)
conn
- Given connection
true
on success, false
if given
connection already belongs to this scopeboolean connect(IConnection conn, Object[] params)
conn
- Given connectionparams
- Parameters passed
true
on success, false
if given
connection already belongs to this scopevoid disconnect(IConnection conn)
conn
- Connection givenIScopeStatistics getStatistics()
boolean setAttribute(String name, Object value)
name
- value
-
Object getAttribute(String name)
name
-
boolean hasAttribute(String name)
name
-
boolean removeAttribute(String name)
name
-
Set<String> getAttributeNames()
Map<String,Object> getAttributes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |