|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.sessions.impl.StaticSessionAttribute
A static session attribute is a session attribute with a value that cannot be changed after creation.
SessionAttribute
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private javax.xml.namespace.QName |
mName
Name of the attribute |
private java.lang.Object |
mValue
Value of the attribute |
Constructor Summary | |
StaticSessionAttribute(javax.xml.namespace.QName name,
java.lang.Object value)
Constructs a dynamic session attribute with the specified name and value. |
Method Summary | |
javax.xml.namespace.QName |
getName()
Gets the name of the session attribute. |
java.lang.Object |
getValue()
Gets the value of the session attribute. |
boolean |
isChangable()
Returns true if the setValue method
is implemented, or otherwise false . |
void |
setValue(java.lang.Object value)
Sets the value of the attribute. |
java.lang.String |
toString()
Returns an XML string describing the attribute. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private final javax.xml.namespace.QName mName
private final java.lang.Object mValue
Constructor Detail |
public StaticSessionAttribute(javax.xml.namespace.QName name, java.lang.Object value)
name
- The qualified name of the session attribute.value
- The value of the session attribute.
java.lang.IllegalArgumentException
- if the name or value is
null
.Method Detail |
public javax.xml.namespace.QName getName()
SessionAttribute
getName
in interface SessionAttribute
null
public java.lang.Object getValue()
SessionAttribute
getValue
in interface SessionAttribute
null
.public void setValue(java.lang.Object value)
SessionAttribute
This method is optional. If it is not supported then an
UnsupportedOperationException
should be
raised and the isChangable()
method should return
false
.
setValue
in interface SessionAttribute
value
- The session attribute value which may be null
.public boolean isChangable()
SessionAttribute
true
if the setValue
method
is implemented, or otherwise false
.
isChangable
in interface SessionAttribute
public java.lang.String toString()
This takes the following form:
<staticSessionAttribute> <name>AttributeName</name> <value>AtributeValue</value> </staticSessionAttribute>Where the attribute name and value are the result of applying
toString()
to the corresponding objects, then
replacing any XML reserved characters with their encoded
equivalents.
toString
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |