|
||||||||||
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 |
ID
ID constant |
static String |
SEPARATOR
Scope separator |
static String |
TYPE
Type constant |
Fields inherited from interface org.red5.server.api.persistence.IPersistable |
---|
TRANSIENT_PREFIX |
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. |
IBasicScope |
getBasicScope(String type,
String name)
Get a child scope by name. |
Iterator<String> |
getBasicScopeNames(String type)
|
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 |
Iterator<String> |
getScopeNames()
Get a set of the child scope names. |
IScopeStatistics |
getStatistics()
Return statistics informations about the scope. |
boolean |
hasChildScope(String name)
Check to see if this scope has a child scope matching a given name. |
boolean |
hasChildScope(String type,
String name)
Checks whether scope has a child scope with given name and type |
boolean |
hasHandler()
Checks whether scope has handler or not. |
Set<IConnection> |
lookupConnections(IClient client)
Lookup connections. |
void |
removeChildScope(IBasicScope scope)
Removes scope from the children scope list. |
Methods inherited from interface org.red5.server.api.IBasicScope |
---|
getDepth, getName, getParent, getPath, getType, hasParent, lock, setKeepDelay, unlock |
Methods inherited from interface org.red5.server.api.ICastingAttributeStore |
---|
getBoolAttribute, getByteAttribute, getDoubleAttribute, getIntAttribute, getListAttribute, getLongAttribute, getMapAttribute, getSetAttribute, getShortAttribute, getStringAttribute |
Methods inherited from interface org.red5.server.api.IAttributeStore |
---|
getAttribute, getAttribute, getAttributeNames, getAttributes, hasAttribute, removeAttribute, removeAttributes, setAttribute, setAttributes, setAttributes |
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 java.lang.Iterable |
---|
iterator |
Methods inherited from interface org.red5.server.api.persistence.IPersistable |
---|
deserialize, getLastModified, getStore, isPersistent, serialize, setName, setPath, setPersistent, setStore |
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 ID
static final String TYPE
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(String 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)
false
if given scope isn't a child of the current scope.
scope
- Scope givenIterator<String> getScopeNames()
Iterator<String> getBasicScopeNames(String type)
IBasicScope getBasicScope(String type, String name)
name
- Name of the child scopetype
- Child scope type
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |