public class StatefulScopeWrappingAdapter extends AbstractScopeAdapter implements IScopeAware, IAttributeStore
| Modifier and Type | Field and Description |
|---|---|
protected List<PluginDescriptor> |
plugins
List of plug-in descriptors
|
protected IScope |
scope
Wrapped scope
|
| Constructor and Description |
|---|
StatefulScopeWrappingAdapter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
createChildScope(String name)
Creates child scope
|
Object |
getAttribute(String name)
Return the value for a given attribute.
|
Object |
getAttribute(String name,
Object defaultValue)
Return the value for a given attribute and set it if it doesn't exist.
|
Set<String> |
getAttributeNames()
Get the attribute names.
|
Map<String,Object> |
getAttributes()
Wrapper for Scope#getAttributes
|
IScope |
getChildScope(String name)
Return child scope
|
Set<String> |
getChildScopeNames()
Iterator for child scope names
|
Set<IClient> |
getClients()
Getter for set of clients
|
Collection<Set<IConnection>> |
getConnections()
Returns all connections in the scope
|
IContext |
getContext()
Getter for context
|
int |
getDepth()
Getter for depth
|
String |
getName()
Getter for name
|
IScope |
getParent()
Return parent scope
|
String |
getPath()
Getter for stateful scope path
|
List<PluginDescriptor> |
getPlugins()
Returns any plug-ins descriptors added
|
org.springframework.core.io.Resource |
getResource(String path)
Return resource by name
|
org.springframework.core.io.Resource[] |
getResources(String pattern)
Returns array of resources (as Spring core Resource class instances)
|
IScope |
getScope()
Getter for wrapped scope
|
boolean |
hasAttribute(String name)
Check the object has an attribute.
|
boolean |
hasChildScope(String name)
Whether this scope has a child scope with given name
|
boolean |
hasParent()
If this scope has a parent
|
Set<IConnection> |
lookupConnections(IClient client) |
boolean |
removeAttribute(String name)
Remove an attribute.
|
void |
removeAttributes()
Remove all attributes.
|
boolean |
setAttribute(String name,
Object value)
Set an attribute on this object.
|
void |
setAttributes(IAttributeStore attributes)
Set multiple attributes on this object.
|
void |
setAttributes(Map<String,Object> attributes)
Set multiple attributes on this object.
|
void |
setPlugins(List<PluginDescriptor> plugins)
Adds a list of plug-in descriptors
|
void |
setScope(IScope scope)
Set the scope the object is located in.
|
addChildScope, checkBandwidth, checkBandwidthUp, connect, disconnect, handleEvent, join, leave, removeChildScope, serviceCall, setCanCallService, setCanConnect, setCanStart, setJoin, start, stopprotected IScope scope
protected List<PluginDescriptor> plugins
public void setScope(IScope scope)
setScope in interface IScopeAwarescope - Scope for this objectpublic IScope getScope()
public List<PluginDescriptor> getPlugins()
public void setPlugins(List<PluginDescriptor> plugins)
plugins - public Object getAttribute(String name)
getAttribute in interface IAttributeStorename - the name of the attribute to getpublic Object getAttribute(String name, Object defaultValue)
This is a utility function that internally performs the following code:
if (!hasAttribute(name)) setAttribute(name, defaultValue);
return getAttribute(name);
getAttribute in interface IAttributeStorename - the name of the attribute to getdefaultValue - the value of the attribute to set if the attribute doesn't
existpublic Set<String> getAttributeNames()
getAttributeNames in interface IAttributeStoregetAttributeNames in interface AttributeStoreMXBeanpublic Map<String,Object> getAttributes()
getAttributes in interface IAttributeStorepublic boolean hasAttribute(String name)
hasAttribute in interface IAttributeStorehasAttribute in interface AttributeStoreMXBeanname - the name of the attribute to checkpublic boolean removeAttribute(String name)
removeAttribute in interface IAttributeStoreremoveAttribute in interface AttributeStoreMXBeanname - the name of the attribute to removepublic void removeAttributes()
removeAttributes in interface IAttributeStoreremoveAttributes in interface AttributeStoreMXBeanpublic boolean setAttribute(String name, Object value)
setAttribute in interface IAttributeStorename - the name of the attribute to changevalue - the new value of the attributepublic void setAttributes(IAttributeStore attributes)
setAttributes in interface IAttributeStoreattributes - the attributes to setpublic void setAttributes(Map<String,Object> attributes)
setAttributes in interface IAttributeStoreattributes - the attributes to setpublic boolean createChildScope(String name)
name - Child scope nametrue on success, false otherwisepublic IScope getChildScope(String name)
name - Child scope namepublic Set<String> getChildScopeNames()
public Collection<Set<IConnection>> getConnections()
public IContext getContext()
public int getDepth()
public String getName()
public IScope getParent()
public String getPath()
public boolean hasChildScope(String name)
name - Child scope nametrue if it does have it, false otherwisepublic boolean hasParent()
true if this scope has a parent scope, false otherwisepublic Set<IConnection> lookupConnections(IClient client)
public org.springframework.core.io.Resource[] getResources(String pattern) throws IOException
pattern - Resource patternIOException - I/O exceptionpublic org.springframework.core.io.Resource getResource(String path)
path - Resource nameCopyright © 2006-2012 The Red5 Project