|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.red5.server.api.ScopeUtils
public class ScopeUtils
Collection of utilities for working with scopes
| Constructor Summary | |
|---|---|
ScopeUtils()
|
|
| Method Summary | |
|---|---|
static IScope |
findApplication(IScope from)
Returns the application scope for specified scope. |
static IScope |
findRoot(IScope from)
Finds root scope for specified scope object. |
static Object |
getScopeService(IScope scope,
Class<?> intf)
Returns scope service that implements a given interface. |
static Object |
getScopeService(IScope scope,
Class<?> intf,
boolean checkHandler)
|
static Object |
getScopeService(IScope scope,
Class<?> intf,
Class<?> defaultClass)
Returns scope service that implements a given interface. |
static Object |
getScopeService(IScope scope,
Class<?> intf,
Class<?> defaultClass,
boolean checkHandler)
|
protected static Object |
getScopeService(IScope scope,
String name)
Returns scope service by bean name. |
protected static Object |
getScopeService(IScope scope,
String name,
Class<?> defaultClass)
Returns scope services (e.g. |
static boolean |
isAncestor(IBasicScope from,
IBasicScope ancestor)
Check whether one scope is an ancestor of another |
static boolean |
isApp(IBasicScope scope)
Check whether scope is an application scope (level 1 leaf in scope tree) or not |
static boolean |
isGlobal(IBasicScope scope)
Check whether scope is the global scope (level 0 leaf in scope tree) or not When user connects the following URL: rtmp://localhost/myapp/foo/bar then / is the global level scope, myapp is app level, foo is room level and bar is room level as well (but with higher depth level) |
static boolean |
isRoom(IBasicScope scope)
Check whether scope is a room scope (level 2 leaf in scope tree or lower, e.g. |
static boolean |
isRoot(IBasicScope scope)
Checks whether scope is root or not |
static IScope |
resolveScope(IScope from,
String path)
Resolves scope for specified scope and path. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScopeUtils()
| Method Detail |
|---|
public static IScope resolveScope(IScope from,
String path)
from - Scope to use as context (to start from)path - Path to resolve
public static IScope findRoot(IScope from)
from - Scope to find root for
public static IScope findApplication(IScope from)
isApp method for details.
from - Scope to find application for
public static boolean isAncestor(IBasicScope from,
IBasicScope ancestor)
from - Scopeancestor - Scope to check
true if ancestor scope is really an ancestor of
scope passed as from parameter, false otherwise.public static boolean isRoot(IBasicScope scope)
scope - Scope to check
true if scope is root scope (top level scope),
false otherwise.public static boolean isGlobal(IBasicScope scope)
scope - Scope to check
true if scope is the global scope,
false otherwise.public static boolean isApp(IBasicScope scope)
scope - Scope to check
true if scope is an application scope,
false otherwise.public static boolean isRoom(IBasicScope scope)
scope - Scope to check
true if scope is a room scope, false
otherwise.
protected static Object getScopeService(IScope scope,
String name)
scope - scopename - name
protected static Object getScopeService(IScope scope,
String name,
Class<?> defaultClass)
scope - The scope service belongs toname - Bean namedefaultClass - Class of service
public static Object getScopeService(IScope scope,
Class<?> intf)
scope - The scope service belongs tointf - The interface the service must implement
public static Object getScopeService(IScope scope,
Class<?> intf,
boolean checkHandler)
public static Object getScopeService(IScope scope,
Class<?> intf,
Class<?> defaultClass)
scope - The scope service belongs tointf - The interface the service must implementdefaultClass - Class that should be used to create a new service if no service was found.
public static Object getScopeService(IScope scope,
Class<?> intf,
Class<?> defaultClass,
boolean checkHandler)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||