Package io.undertow.attribute
Class SubstituteEmptyWrapper.SubstituteEmptyAttribute
- java.lang.Object
-
- io.undertow.attribute.SubstituteEmptyWrapper.SubstituteEmptyAttribute
-
- All Implemented Interfaces:
ExchangeAttribute
- Enclosing class:
- SubstituteEmptyWrapper
public static class SubstituteEmptyWrapper.SubstituteEmptyAttribute extends java.lang.Object implements ExchangeAttribute
-
-
Constructor Summary
Constructors Constructor Description SubstituteEmptyAttribute(ExchangeAttribute attribute, java.lang.String substitute)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringreadAttribute(HttpServerExchange exchange)Resolve the attribute from the HTTP server exchange.voidwriteAttribute(HttpServerExchange exchange, java.lang.String newValue)Sets a new value for the attribute.
-
-
-
Constructor Detail
-
SubstituteEmptyAttribute
public SubstituteEmptyAttribute(ExchangeAttribute attribute, java.lang.String substitute)
-
-
Method Detail
-
readAttribute
public java.lang.String readAttribute(HttpServerExchange exchange)
Description copied from interface:ExchangeAttributeResolve the attribute from the HTTP server exchange. This may return null if the attribute is not present.- Specified by:
readAttributein interfaceExchangeAttribute- Parameters:
exchange- The exchange- Returns:
- The attribute
-
writeAttribute
public void writeAttribute(HttpServerExchange exchange, java.lang.String newValue) throws ReadOnlyAttributeException
Description copied from interface:ExchangeAttributeSets a new value for the attribute. Not all attributes are writable.- Specified by:
writeAttributein interfaceExchangeAttribute- Parameters:
exchange- The exchangenewValue- The new value for the attribute- Throws:
ReadOnlyAttributeException- when attribute cannot be written
-
-