Interface Attributes
- All Known Subinterfaces:
 ConnectionMetaData, Context, Environment, Request, Request.ServeAs, ServerUpgradeRequest, ServerUpgradeRequest, Session
- All Known Implementing Classes:
 AbstractMetaDataConnection, AttributeContainerMap, Attributes.Layer, Attributes.Lazy, Attributes.Mapped, Attributes.Synthetic, Attributes.Wrapper, AttributesMap, ConnectionMetaData.Wrapper, Context.Wrapper, ContextHandler, ContextHandler, ContextHandler, ContextHandler.CoreContextHandler, ContextHandler.CoreContextHandler, ContextHandler.CoreContextRequest, ContextHandler.CoreContextRequest, ContextHandler.ScopedContext, ContextRequest, CoreAppContext, ErrorHandler.ErrorRequest, GzipRequest, HeaderWrappingRequest, HttpConversation, HttpSpiContextHandler, ManagedSession, MovedContextHandler, PathMappingsHandler.PathSpecRequest, Request.AttributesWrapper, Request.Wrapper, ResourceHandler.ResourceContext, RewriteEncodingRule.EncodingHandler, RewriteEncodingRule.VaryHandler, RewriteLanguageRule.LanguageHandler, RewriteLanguageRule.VaryHandler, Rule.Handler, Rule.HttpURIHandler, SecureRequestCustomizer.SecureRequest, SecureRequestCustomizer.SecureRequestWithSslSessionData, Server, ServletAttributes, ServletAttributes, ServletContextHandler, ServletContextHandler, ServletContextHandler, ServletContextHandler, ServletContextHandler.ServletScopedContext, ServletContextHandler.ServletScopedContext, ServletContextRequest, ServletContextRequest, ServletCoreRequest, ServletCoreRequest, ServletCoreRequest, ServletCoreRequest, ServletCoreRequest.ServletAttributes, ServletCoreRequest.ServletAttributes, ServletCoreRequest.ServletAttributes, ServletCoreRequest.ServletAttributes, SessionHandler.SessionRequest, StaticAppContext, StatisticsHandler.MinimumDataRateHandler.MinimumDataRateRequest, WebAppContext, WebAppContext, WebAppContext, WebAppContext
public interface Attributes
Attributes.
Interface commonly used for storing attributes.
Some attributes may be "hidden" attributes, in that they are only found by an explicit call to
getAttribute(String) and they do not otherwise appear in getAttributeNameSet()
or asAttributeMap().
- 
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classAnAttributesimplementation backed by anotherAttributesinstance, which is treated as immutable, but with a ConcurrentHashMap used as a mutable layer over it.static classAnAttributesimplementation that lazily creates a backing map iff it is actually needed.static classAn Attributes implementation backed by aConcurrentHashMap.static classAn abstract implementation ofAttributes.Wrapperthat provides a mechanism for synthetic attributes that can be modified or deleted.static classA Wrapper of attributes - 
Field Summary
Fields - 
Method Summary
Modifier and TypeMethodDescriptiondefault voidClear all attribute namesbooleanstatic booleanequals(Attributes attributes, Object o) getAttribute(String name) Get an attribute by name.Get the immutable set of attribute names.inthashCode()static inthashCode(Attributes attributes) removeAttribute(String name) Remove an attributesetAttribute(String name, Object attribute) Set an attributestatic Attributesunwrap(Attributes attributes) Unwrap allAttributes.Wrappers of the attributesstatic <T extends Attributes.Wrapper>
Tunwrap(Attributes attributes, Class<T> target) Unwrap attributes to a specific attributeAttributes.Wrapper. 
- 
Field Details
- 
NULL
 
 - 
 - 
Method Details
- 
removeAttribute
 - 
setAttribute
 - 
getAttribute
Get an attribute by name. Some attributes may be "hidden" attributes, in that they are only found by an explicit call togetAttribute(String)and they do not otherwise appear ingetAttributeNameSet()orasAttributeMap().- Parameters:
 name- the attribute to get- Returns:
 - the value of the attribute, or 
nullif no such attribute exists 
 - 
getAttributeNameSet
 - 
asAttributeMap
 - 
clearAttributes
default void clearAttributes()Clear all attribute names - 
hashCode
 - 
equals
 - 
unwrap
Unwrap allAttributes.Wrappers of the attributes- Parameters:
 attributes- The attributes to unwrap, which may be aAttributes.Wrapper.- Returns:
 - The core attributes
 
 - 
hashCode
 - 
equals
 - 
unwrap
Unwrap attributes to a specific attributeAttributes.Wrapper.- Type Parameters:
 T- The type of the targetAttributes.Wrapper.- Parameters:
 attributes- The attributes to unwrap, which may be aAttributes.Wrappertarget- The targetAttributes.Wrapperclass.- Returns:
 - The outermost 
Attributes.Wrapperof the matching type of null if not found. 
 
 -