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
|
Resource |
getResource(String path)
Return resource by name
|
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)
Returns all connections for a given 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.
|
boolean |
setAttributes(IAttributeStore attributes)
Set multiple attributes on this object.
|
boolean |
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.
|
int |
size()
Size of the attribute store.
|
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 - pluginspublic Object getAttribute(String name)
getAttribute in interface IAttributeStorename - the name of the attribute to getpublic Object getAttribute(String name, Object defaultValue)
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 int size()
size in interface IAttributeStorepublic boolean setAttribute(String name, Object value)
setAttribute in interface IAttributeStorename - the name of the attribute to changevalue - the new value of the attributepublic boolean setAttributes(IAttributeStore attributes)
setAttributes in interface IAttributeStoreattributes - the attributes to setpublic boolean setAttributes(Map<String,Object> attributes)
setAttributes in interface IAttributeStoreattributes - the attributes to setpublic boolean createChildScope(String name)
name - Child scope namepublic IScope getChildScope(String name)
name - Child scope namepublic Set<String> getChildScopeNames()
public Collection<Set<IConnection>> getConnections()
public Set<IConnection> lookupConnections(IClient client)
client - clientpublic IContext getContext()
public int getDepth()
public String getName()
public IScope getParent()
public String getPath()
public boolean hasChildScope(String name)
name - Child scope namepublic boolean hasParent()
public Resource[] getResources(String pattern) throws IOException
pattern - Resource patternIOException - I/O exceptionCopyright © 2005–2017 Red5. All rights reserved.