|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Attribute
Attributes are values that can be set on AttributeHolders. When setting an attribute you can set 0 to many flags that will customize how the attribute behaves on the server. You can set more than 1 flag on an attribute using the bitwise OR (|) operator. Example: setAttribute("name", "Chatter", "chatRoom", Attribute.FLAG_SHARED)
AttributeHolder
Field Summary | |
---|---|
static int |
FLAG_EVALUATE
Indicates the value of the attribute should be evaluated as a mathematical expression before assignment. |
static int |
FLAG_IGNORE
|
static int |
FLAG_IMMUTABLE
Indicates that once the attribute is set it can no longer be changed. |
static int |
FLAG_NONE
|
static int |
FLAG_PERSISTENT
Flags that the attribute should be persisted by a datasource. |
static int |
FLAG_SERVER_ONLY
Indicates the attribute can be changed only by code on the server (i.e. |
static int |
FLAG_SHARED
Flags the attribute should be shared. |
static int |
FLAG_SOFTLY_PERSISTENT
Unsupported in Alpha |
static java.lang.String |
SCOPE_GLOBAL
Indicates the scope should be global. |
Method Summary | |
---|---|
int |
getFlags()
Returns the flags set for the attribute. |
java.lang.String |
getName()
Returns the name of the attribute |
java.lang.String |
getScope()
Returns the scope of the attribute. |
java.lang.Object |
getValue()
Returns the value of the attribute. |
java.lang.String |
nullSafeGetValue()
Returns the value of the attribute as a String by calling the Object toString() method. |
void |
remove()
Removes the attribute from its holder (Server, Client, or Room). |
void |
setFlags(int flags)
Sets the flags for the attribute. |
void |
setValue(java.lang.Object value)
Sets the value of the attribute |
Field Detail |
---|
static final int FLAG_IGNORE
static final int FLAG_NONE
static final int FLAG_SHARED
static final int FLAG_PERSISTENT
static final int FLAG_IMMUTABLE
static final int FLAG_SERVER_ONLY
static final int FLAG_SOFTLY_PERSISTENT
static final int FLAG_EVALUATE
static final java.lang.String SCOPE_GLOBAL
Method Detail |
---|
java.lang.String getName()
java.lang.String getScope()
int getFlags()
java.lang.Object getValue()
java.lang.String nullSafeGetValue()
void setValue(java.lang.Object value) throws AttributeException
value
- - the new value of the attribute
AttributeException
void setFlags(int flags) throws AttributeException
flags
- - the flags for the attribute
AttributeException
void remove()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |