本文整理汇总了Java中org.red5.server.api.scope.IScope.addChildScope方法的典型用法代码示例。如果您正苦于以下问题:Java IScope.addChildScope方法的具体用法?Java IScope.addChildScope怎么用?Java IScope.addChildScope使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.red5.server.api.scope.IScope
的用法示例。
在下文中一共展示了IScope.addChildScope方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createSharedObject
import org.red5.server.api.scope.IScope; //导入方法依赖的package包/类
/** {@inheritDoc} */
public boolean createSharedObject(IScope scope, String name, boolean persistent) {
boolean added = hasSharedObject(scope, name);
if (!added) {
log.debug("Attempting to add shared object: {} to {}", name, scope.getName());
added = scope.addChildScope(new SharedObjectScope(scope, name, persistent, getStore(scope, persistent)));
if (!added) {
added = hasSharedObject(scope, name);
log.debug("Add failed on create, shared object already exists: {}", added);
}
} else {
// the shared object already exists
log.trace("Shared object ({}) already exists. Persistent: {}", name, persistent);
}
// added or already existing will be true
return added;
}