Package io.undertow.util
Class AttachmentKey<T>
java.lang.Object
io.undertow.util.AttachmentKey<T>
- Type Parameters:
T
- the attachment type
An immutable, type-safe object attachment key. Such a key has no value outside of its object identity.
-
Method Summary
Modifier and TypeMethodDescriptionabstract T
Cast the value to the type of this attachment key.static <T> AttachmentKey<T>
Construct a new simple attachment key.static <T> AttachmentKey<AttachmentList<T>>
createList
(Class<? super T> valueClass) Construct a new list attachment key.
-
Method Details
-
cast
Cast the value to the type of this attachment key.- Parameters:
value
- the value- Returns:
- the cast value
-
create
Construct a new simple attachment key.- Type Parameters:
T
- the attachment type- Parameters:
valueClass
- the value class- Returns:
- the new instance
-
createList
Construct a new list attachment key.- Type Parameters:
T
- the list value type- Parameters:
valueClass
- the list value class- Returns:
- the new instance
-