Package io.undertow.attribute
Interface ExchangeAttribute
-
- All Known Implementing Classes:
AuthenticationTypeExchangeAttribute,BytesSentAttribute,CompositeExchangeAttribute,ConstantExchangeAttribute,CookieAttribute,DateTimeAttribute,HostAndPortAttribute,IdentUsernameAttribute,LocalIPAttribute,LocalPortAttribute,LocalServerNameAttribute,NullAttribute,PathParameterAttribute,PredicateContextAttribute,QueryParameterAttribute,QueryStringAttribute,QuotingExchangeAttribute,RelativePathAttribute,RemoteHostAttribute,RemoteIPAttribute,RemoteObfuscatedIPAttribute,RemoteUserAttribute,RequestCookieAttribute,RequestHeaderAttribute,RequestLineAttribute,RequestMethodAttribute,RequestPathAttribute,RequestProtocolAttribute,RequestSchemeAttribute,RequestURLAttribute,ResolvedPathAttribute,ResponseCodeAttribute,ResponseCookieAttribute,ResponseHeaderAttribute,ResponseReasonPhraseAttribute,ResponseTimeAttribute,SecureExchangeAttribute,SslCipherAttribute,SslClientCertAttribute,SslSessionIdAttribute,StoredResponse,SubstituteEmptyWrapper.SubstituteEmptyAttribute,ThreadNameAttribute,TransportProtocolAttribute
public interface ExchangeAttributeRepresentation of a string attribute from a HTTP server exchange.- Author:
- Stuart Douglas
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringreadAttribute(HttpServerExchange exchange)Resolve the attribute from the HTTP server exchange.voidwriteAttribute(HttpServerExchange exchange, String newValue)Sets a new value for the attribute.
-
-
-
Method Detail
-
readAttribute
String readAttribute(HttpServerExchange exchange)
Resolve the attribute from the HTTP server exchange. This may return null if the attribute is not present.- Parameters:
exchange- The exchange- Returns:
- The attribute
-
writeAttribute
void writeAttribute(HttpServerExchange exchange, String newValue) throws ReadOnlyAttributeException
Sets a new value for the attribute. Not all attributes are writable.- Parameters:
exchange- The exchangenewValue- The new value for the attribute- Throws:
ReadOnlyAttributeException- when attribute cannot be written
-
-