Package org.eclipse.jetty.server
Class Request.AttributesWrapper
java.lang.Object
org.eclipse.jetty.server.Request.Wrapper
org.eclipse.jetty.server.Request.AttributesWrapper
- All Implemented Interfaces:
Content.Source
,Request
,Attributes
- Direct Known Subclasses:
ErrorHandler.ErrorRequest
,SecureRequestCustomizer.SecureRequestWithSslSessionData
- Enclosing interface:
- Request
A Request.Wrapper
that separately provides the request Attributes
.
The provided Attributes
should be an Attributes.Wrapper
over the request.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.Attributes
Attributes.Layer, Attributes.Lazy, Attributes.Mapped, Attributes.Synthetic
Nested classes/interfaces inherited from interface org.eclipse.jetty.server.Request
Request.AttributesWrapper, Request.AuthenticationState, Request.Handler, Request.ServeAs, Request.Wrapper
-
Field Summary
Fields inherited from interface org.eclipse.jetty.util.Attributes
NULL
Fields inherited from interface org.eclipse.jetty.server.Request
COOKIE_ATTRIBUTE, DEFAULT_LOCALES, LOG
-
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.server.Request.Wrapper
addFailureListener, addHttpStreamWrapper, addIdleTimeoutListener, consumeAvailable, demand, fail, getBeginNanoTime, getComponents, getConnectionMetaData, getContext, getHeaders, getHeadersNanoTime, getHttpURI, getId, getLength, getMethod, getSession, getTrailers, getTunnelSupport, getWrapped, isSecure, push, read, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.util.Attributes
equals, hashCode
Methods inherited from interface org.eclipse.jetty.io.Content.Source
fail, rewind
-
Constructor Details
-
AttributesWrapper
- Parameters:
wrapped
- the request to wrapattributes
- the provided request attributes, typically aAttributes.Wrapper
over the request
-
-
Method Details
-
asAttributeMap
- Specified by:
asAttributeMap
in interfaceAttributes
- Overrides:
asAttributeMap
in classRequest.Wrapper
-
clearAttributes
public void clearAttributes()Description copied from interface:Attributes
Clear all attribute names- Specified by:
clearAttributes
in interfaceAttributes
- Overrides:
clearAttributes
in classRequest.Wrapper
-
removeAttribute
Description copied from interface:Attributes
Remove an attribute- Specified by:
removeAttribute
in interfaceAttributes
- Overrides:
removeAttribute
in classRequest.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 classRequest.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 classRequest.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 classRequest.Wrapper
- Returns:
- Set of attribute names, or an empty set if there are no attributes.
-