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 Attributes
Attributes.Layer, Attributes.Lazy, Attributes.Mapped, Attributes.SyntheticNested classes/interfaces inherited from interface Content.Source
Content.Source.FactoryNested classes/interfaces inherited from interface Request
Request.AttributesWrapper, Request.AuthenticationState, Request.Handler, Request.ServeAs, Request.Wrapper -
Field Summary
Fields inherited from interface Attributes
NULLFields inherited from interface Request
COOKIE_ATTRIBUTE, DEFAULT_LOCALES, LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClear 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 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, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Attributes
equals, hashCodeMethods inherited from interface Content.Source
fail, rewind
-
Constructor Details
-
AttributesWrapper
- Parameters:
wrapped- the request to wrapattributes- the provided request attributes, typically aAttributes.Wrapperover the request
-
-
Method Details
-
asAttributeMap
- Specified by:
asAttributeMapin interfaceAttributes- Overrides:
asAttributeMapin classRequest.Wrapper
-
clearAttributes
public void clearAttributes()Description copied from interface:AttributesClear all attribute names- Specified by:
clearAttributesin interfaceAttributes- Overrides:
clearAttributesin classRequest.Wrapper
-
removeAttribute
Description copied from interface:AttributesRemove an attribute- Specified by:
removeAttributein interfaceAttributes- Overrides:
removeAttributein classRequest.Wrapper- Parameters:
name- the attribute to remove- Returns:
- the value of the attribute if removed, else
null
-
setAttribute
Description copied from interface:AttributesSet an attribute- Specified by:
setAttributein interfaceAttributes- Overrides:
setAttributein 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:AttributesGet an attribute- Specified by:
getAttributein interfaceAttributes- Overrides:
getAttributein classRequest.Wrapper- Parameters:
name- the attribute to get- Returns:
- the value of the attribute, or
nullif no such attribute exists
-
getAttributeNameSet
Description copied from interface:AttributesGet the immutable set of attribute names.- Specified by:
getAttributeNameSetin interfaceAttributes- Overrides:
getAttributeNameSetin classRequest.Wrapper- Returns:
- Set of attribute names, or an empty set if there are no attributes.
-