public class ServletContextAttribute extends Object implements ExchangeAttribute
Modifier and Type | Class and Description |
---|---|
static class |
ServletContextAttribute.Builder |
Constructor and Description |
---|
ServletContextAttribute(String attributeName) |
Modifier and Type | Method and Description |
---|---|
String |
readAttribute(HttpServerExchange exchange)
Resolve the attribute from the HTTP server exchange.
|
void |
writeAttribute(HttpServerExchange exchange,
String newValue)
Sets a new value for the attribute.
|
public ServletContextAttribute(String attributeName)
public String readAttribute(HttpServerExchange exchange)
ExchangeAttribute
readAttribute
in interface ExchangeAttribute
exchange
- The exchangepublic void writeAttribute(HttpServerExchange exchange, String newValue) throws ReadOnlyAttributeException
ExchangeAttribute
writeAttribute
in interface ExchangeAttribute
exchange
- The exchangenewValue
- The new value for the attributeReadOnlyAttributeException
- when attribute cannot be writtenCopyright © 2019 JBoss by Red Hat. All rights reserved.