|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.red5.server.AttributeStore
public class AttributeStore
| Field Summary | |
|---|---|
protected ConcurrentMap<String,Object> |
attributes
Map for attributes |
| Constructor Summary | |
|---|---|
AttributeStore()
Creates empty attribute store. |
|
AttributeStore(IAttributeStore values)
Creates attribute store with initial values. |
|
AttributeStore(Map<String,Object> values)
Creates attribute store with initial values. |
|
| Method Summary | |
|---|---|
protected Map<String,Object> |
filterNull(Map<String,Object> values)
Filter null keys and values from given map. |
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()
Get the attributes. |
Boolean |
getBoolAttribute(String name)
Get Boolean attribute by name |
Byte |
getByteAttribute(String name)
Get Byte attribute by name |
Double |
getDoubleAttribute(String name)
Get Double attribute by name |
Integer |
getIntAttribute(String name)
Get Integer attribute by name |
List<?> |
getListAttribute(String name)
Get List attribute by name |
Long |
getLongAttribute(String name)
Get boolean attribute by name |
Map<?,?> |
getMapAttribute(String name)
Get Long attribute by name |
Set<?> |
getSetAttribute(String name)
Get Set attribute by name |
Short |
getShortAttribute(String name)
Get Short attribute by name |
String |
getStringAttribute(String name)
Get String attribute by name |
boolean |
hasAttribute(String name)
Check the object has an attribute. |
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 values)
Set multiple attributes on this object. |
void |
setAttributes(Map<String,Object> values)
Set multiple attributes on this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ConcurrentMap<String,Object> attributes
| Constructor Detail |
|---|
public AttributeStore()
public AttributeStore(Map<String,Object> values)
values - mappublic AttributeStore(IAttributeStore values)
values - map| Method Detail |
|---|
protected Map<String,Object> filterNull(Map<String,Object> values)
null keys and values from given map.
values - the map to filter
public Set<String> getAttributeNames()
getAttributeNames in interface AttributeStoreMBeangetAttributeNames in interface IAttributeStorepublic Map<String,Object> getAttributes()
getAttributes in interface AttributeStoreMBeangetAttributes in interface IAttributeStorepublic Object getAttribute(String name)
getAttribute in interface AttributeStoreMBeangetAttribute in interface IAttributeStorename - the name of the attribute to get
public Object getAttribute(String name,
Object defaultValue)
getAttribute in interface AttributeStoreMBeangetAttribute in interface IAttributeStorename - the name of the attribute to getdefaultValue - the value of the attribute to set if the attribute doesn't
exist
public boolean hasAttribute(String name)
hasAttribute in interface AttributeStoreMBeanhasAttribute in interface IAttributeStorename - the name of the attribute to check
public boolean setAttribute(String name,
Object value)
setAttribute in interface AttributeStoreMBeansetAttribute in interface IAttributeStorename - the name of the attribute to changevalue - the new value of the attribute
public void setAttributes(Map<String,Object> values)
setAttributes in interface IAttributeStorevalues - the attributes to setpublic void setAttributes(IAttributeStore values)
setAttributes in interface IAttributeStorevalues - the attributes to setpublic boolean removeAttribute(String name)
removeAttribute in interface AttributeStoreMBeanremoveAttribute in interface IAttributeStorename - the name of the attribute to remove
public void removeAttributes()
removeAttributes in interface AttributeStoreMBeanremoveAttributes in interface IAttributeStorepublic Boolean getBoolAttribute(String name)
getBoolAttribute in interface ICastingAttributeStorename - Attribute name
public Byte getByteAttribute(String name)
getByteAttribute in interface ICastingAttributeStorename - Attribute name
public Double getDoubleAttribute(String name)
getDoubleAttribute in interface ICastingAttributeStorename - Attribute name
public Integer getIntAttribute(String name)
getIntAttribute in interface ICastingAttributeStorename - Attribute name
public List<?> getListAttribute(String name)
getListAttribute in interface ICastingAttributeStorename - Attribute name
public Long getLongAttribute(String name)
getLongAttribute in interface ICastingAttributeStorename - Attribute name
public Map<?,?> getMapAttribute(String name)
getMapAttribute in interface ICastingAttributeStorename - Attribute name
public Set<?> getSetAttribute(String name)
getSetAttribute in interface ICastingAttributeStorename - Attribute name
public Short getShortAttribute(String name)
getShortAttribute in interface ICastingAttributeStorename - Attribute name
public String getStringAttribute(String name)
getStringAttribute in interface ICastingAttributeStorename - Attribute name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||