Package io.undertow.attribute
Class QuotingExchangeAttribute
- java.lang.Object
-
- io.undertow.attribute.QuotingExchangeAttribute
-
- All Implemented Interfaces:
ExchangeAttribute
public class QuotingExchangeAttribute extends java.lang.Object implements ExchangeAttribute
Exchange attribute that wraps string attributes in quotes. This is mostly used- Author:
- Stuart Douglas
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
QuotingExchangeAttribute.Wrapper
-
Field Summary
Fields Modifier and Type Field Description static ExchangeAttributeWrapper
WRAPPER
-
Constructor Summary
Constructors Constructor Description QuotingExchangeAttribute(ExchangeAttribute exchangeAttribute)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
readAttribute(HttpServerExchange exchange)
Resolve the attribute from the HTTP server exchange.void
writeAttribute(HttpServerExchange exchange, java.lang.String newValue)
Sets a new value for the attribute.
-
-
-
Field Detail
-
WRAPPER
public static final ExchangeAttributeWrapper WRAPPER
-
-
Constructor Detail
-
QuotingExchangeAttribute
public QuotingExchangeAttribute(ExchangeAttribute exchangeAttribute)
-
-
Method Detail
-
readAttribute
public java.lang.String readAttribute(HttpServerExchange exchange)
Description copied from interface:ExchangeAttribute
Resolve the attribute from the HTTP server exchange. This may return null if the attribute is not present.- Specified by:
readAttribute
in interfaceExchangeAttribute
- Parameters:
exchange
- The exchange- Returns:
- The attribute
-
writeAttribute
public void writeAttribute(HttpServerExchange exchange, java.lang.String newValue) throws ReadOnlyAttributeException
Description copied from interface:ExchangeAttribute
Sets a new value for the attribute. Not all attributes are writable.- Specified by:
writeAttribute
in interfaceExchangeAttribute
- Parameters:
exchange
- The exchangenewValue
- The new value for the attribute- Throws:
ReadOnlyAttributeException
- when attribute cannot be written
-
-