public interface AttributeStore
| Modifier and Type | Interface and Description |
|---|---|
static class |
AttributeStore.AttributeKey<T>
Type safe key for storage of user attributes.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getAttribute(AttributeStore.AttributeKey<T> key)
Returns the value of the user-defined attribute.
|
<T> T |
removeAttribute(AttributeStore.AttributeKey<T> key)
Removes the user-defined attribute
|
<T> T |
resolveAttribute(AttributeStore.AttributeKey<T> key)
Attempts to resolve the associated value by going up the store's
hierarchy (if any)
|
static <T> T |
resolveAttribute(Channel channel,
AttributeStore.AttributeKey<T> key)
Attempts to use the channel attribute, if not found then tries the session
|
static <T> T |
resolveAttribute(FactoryManager manager,
AttributeStore.AttributeKey<T> key) |
static <T> T |
resolveAttribute(Session session,
AttributeStore.AttributeKey<T> key)
Attempts to use the session's attribute, if not found then tries the factory manager
|
<T> T |
setAttribute(AttributeStore.AttributeKey<T> key,
T value)
Sets a user-defined attribute.
|
<T> T getAttribute(AttributeStore.AttributeKey<T> key)
T - The generic attribute typekey - The key of the attribute; must not be null.<T> T setAttribute(AttributeStore.AttributeKey<T> key, T value)
T - The generic attribute typekey - The key of the attribute; must not be null.value - The value of the attribute; must not be null.null if it is new.<T> T removeAttribute(AttributeStore.AttributeKey<T> key)
T - The generic attribute typekey - The key of the attribute; must not be null.null if no previous value<T> T resolveAttribute(AttributeStore.AttributeKey<T> key)
T - The generic attribute typekey - The key of the attribute; must not be null.static <T> T resolveAttribute(FactoryManager manager, AttributeStore.AttributeKey<T> key)
T - The generic attribute typemanager - The FactoryManager - ignored if nullkey - The attribute key - never nullnull if not foundstatic <T> T resolveAttribute(Session session, AttributeStore.AttributeKey<T> key)
T - The generic attribute typesession - The Session - ignored if nullkey - The attribute key - never nullnull if not foundFactoryManagerHolder.getFactoryManager(),
resolveAttribute(FactoryManager, AttributeKey)static <T> T resolveAttribute(Channel channel, AttributeStore.AttributeKey<T> key)
T - The generic attribute typechannel - The Channel - ignored if nullkey - The attribute key - never nullnull if not foundFactoryManagerHolder.getFactoryManager(),
resolveAttribute(Session, AttributeKey)Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.