Package org.eclipse.jetty.util
Class Attributes.Layer
java.lang.Object
org.eclipse.jetty.util.Attributes.Wrapper
org.eclipse.jetty.util.Attributes.Layer
- All Implemented Interfaces:
Attributes
- Direct Known Subclasses:
ContextHandler.ScopedContext
- Enclosing interface:
- Attributes
An
Attributes
implementation backed by another Attributes
instance, which is treated as immutable, but with a
ConcurrentHashMap used as a mutable layer over it.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.Attributes
Attributes.Layer, Attributes.Lazy, Attributes.Mapped, Attributes.Synthetic, Attributes.Wrapper
-
Field Summary
Fields inherited from interface org.eclipse.jetty.util.Attributes
NULL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear all attribute namesgetAttribute
(String name) Get an attributeGet the immutable set of attribute names.removeAttribute
(String name) Remove an attributesetAttribute
(String name, Object attribute) Set an attributeMethods inherited from class org.eclipse.jetty.util.Attributes.Wrapper
equals, getWrapped, hashCode
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.util.Attributes
asAttributeMap
-
Constructor Details
-
Layer
-
Layer
-
-
Method Details
-
getPersistentAttributes
-
removeAttribute
Description copied from interface:Attributes
Remove an attribute- Specified by:
removeAttribute
in interfaceAttributes
- Overrides:
removeAttribute
in classAttributes.Wrapper
- Parameters:
name
- the attribute to remove- Returns:
- the value of the attribute if removed, else
null
-
setAttribute
Description copied from interface:Attributes
Set an attribute- Specified by:
setAttribute
in interfaceAttributes
- Overrides:
setAttribute
in classAttributes.Wrapper
- Parameters:
name
- the attribute to setattribute
- the value to set. A null value is equivalent to removing the attribute.- Returns:
- the previous value of the attribute if set, else
null
-
getAttribute
Description copied from interface:Attributes
Get an attribute- Specified by:
getAttribute
in interfaceAttributes
- Overrides:
getAttribute
in classAttributes.Wrapper
- Parameters:
name
- the attribute to get- Returns:
- the value of the attribute, or
null
if no such attribute exists
-
getAttributeNameSet
Description copied from interface:Attributes
Get the immutable set of attribute names.- Specified by:
getAttributeNameSet
in interfaceAttributes
- Overrides:
getAttributeNameSet
in classAttributes.Wrapper
- Returns:
- Set of attribute names, or an empty set if there are no attributes.
-
clearAttributes
public void clearAttributes()Description copied from interface:Attributes
Clear all attribute names- Specified by:
clearAttributes
in interfaceAttributes
- Overrides:
clearAttributes
in classAttributes.Wrapper
-