Package org.jboss.remoting3
Class Attachments
- java.lang.Object
-
- org.jboss.remoting3.Attachments
-
public final class Attachments extends Object
A set of attachments for an entity.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Attachments.Key<T>
An attachment key.
-
Constructor Summary
Constructors Constructor Description Attachments()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
attach(Attachments.Key<T> key, T value)
<T> T
attachIfAbsent(Attachments.Key<T> key, T value)
<T> T
getAttachment(Attachments.Key<T> key)
<T> T
removeAttachment(Attachments.Key<T> key)
<T> boolean
removeAttachment(Attachments.Key<T> key, T value)
<T> boolean
replaceAttachment(Attachments.Key<T> key, T expect, T replacement)
-
-
-
Method Detail
-
attach
public <T> T attach(Attachments.Key<T> key, T value)
-
attachIfAbsent
public <T> T attachIfAbsent(Attachments.Key<T> key, T value)
-
replaceAttachment
public <T> boolean replaceAttachment(Attachments.Key<T> key, T expect, T replacement)
-
removeAttachment
public <T> T removeAttachment(Attachments.Key<T> key)
-
removeAttachment
public <T> boolean removeAttachment(Attachments.Key<T> key, T value)
-
getAttachment
public <T> T getAttachment(Attachments.Key<T> key)
-
-