Package io.undertow.attribute
Class SecureExchangeAttribute
- java.lang.Object
-
- io.undertow.attribute.SecureExchangeAttribute
-
- All Implemented Interfaces:
ExchangeAttribute
public class SecureExchangeAttribute extends Object implements ExchangeAttribute
- Author:
- Stuart Douglas
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SecureExchangeAttribute.Builder
-
Field Summary
Fields Modifier and Type Field Description static ExchangeAttribute
INSTANCE
static String
LEGACY_INCORRECT_TOKEN
static String
TOKEN
-
Constructor Summary
Constructors Constructor Description SecureExchangeAttribute()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
readAttribute(HttpServerExchange exchange)
Resolve the attribute from the HTTP server exchange.String
toString()
void
writeAttribute(HttpServerExchange exchange, String newValue)
Sets a new value for the attribute.
-
-
-
Field Detail
-
TOKEN
public static final String TOKEN
- See Also:
- Constant Field Values
-
LEGACY_INCORRECT_TOKEN
public static final String LEGACY_INCORRECT_TOKEN
- See Also:
- Constant Field Values
-
INSTANCE
public static final ExchangeAttribute INSTANCE
-
-
Method Detail
-
readAttribute
public 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, 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
-
-