|
JBoss EJB client 1.0.5.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.ejb.client.Attachable
public abstract class Attachable
An object which may have attachments. Even if the object is serializable, its attachment map is not and will always deserialize empty.
Method Summary | ||
---|---|---|
|
getAttachment(AttachmentKey<T> key)
Get an attachment from this object. |
|
|
putAttachment(AttachmentKey<T> key,
T value)
Set an attachment on this object. |
|
|
putAttachmentIfAbsent(AttachmentKey<T> key,
T value)
Set an attachment on this object if an existing attachment does not already exist. |
|
|
removeAttachment(AttachmentKey<T> key)
Remove and return an attachment value. |
|
|
removeAttachment(AttachmentKey<T> key,
T value)
Remove an attachment if it has a certain value. |
|
|
replaceAttachment(AttachmentKey<T> key,
T value)
Replace an attachment on this object if an existing attachment exists. |
|
|
replaceAttachment(AttachmentKey<T> key,
T oldValue,
T newValue)
Replace an attachment on this object if an existing attachment exists with a certain value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public <T> T getAttachment(AttachmentKey<T> key)
T
- the attachment typekey
- the attachment key
public <T> T putAttachment(AttachmentKey<T> key, T value)
T
- the attachment typekey
- the attachment keyvalue
- the attachment's new value (may not be null
)
null
if there was nonepublic <T> T putAttachmentIfAbsent(AttachmentKey<T> key, T value)
T
- the attachment typekey
- the attachment keyvalue
- the attachment's new value (may not be null
)
null
if there was nonepublic <T> T replaceAttachment(AttachmentKey<T> key, T value)
T
- the attachment typekey
- the attachment keyvalue
- the attachment's new value (may not be null
)
null
if there was nonepublic <T> boolean replaceAttachment(AttachmentKey<T> key, T oldValue, T newValue)
T
- the attachment typekey
- the attachment keyoldValue
- the attachment's expected value (may not be null
)newValue
- the attachment's new value (may not be null
)
true
if the old value matched and the value was replaced; false
otherwisepublic <T> T removeAttachment(AttachmentKey<T> key)
T
- the attachment typekey
- the attachment key
null
if there was nonepublic <T> boolean removeAttachment(AttachmentKey<T> key, T value)
T
- the attachment typekey
- the attachment keyvalue
- the attachment's expected value (may not be null
)
true
if the value was removed, false
if there was no attachment
|
JBoss EJB client 1.0.5.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |