Top Description Fields Constructors Methods
io.undertow.attribute

public Class ConstantExchangeAttribute

extends Object
implements ExchangeAttribute
Class Inheritance
All Implemented Interfaces
io.undertow.attribute.ExchangeAttribute
Imports
io.undertow.server.HttpServerExchange

Exchange attribute that represents a fixed value
Author
Stuart Douglas

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
readAttribute(final HttpServerExchange
The exchange
exchange
)

Implements io.undertow.attribute.ExchangeAttribute.readAttribute.

Resolve the attribute from the HTTP server exchange.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
writeAttribute(final HttpServerExchange
The exchange
exchange
,
final String
The new value for the attribute
newValue
)

Implements io.undertow.attribute.ExchangeAttribute.writeAttribute.

Sets a new value for the attribute.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

valueback to summary
private final String value

Constructor Detail

ConstantExchangeAttributeback to summary
public ConstantExchangeAttribute(final String value)

Method Detail

readAttributeback to summary
public String readAttribute(final HttpServerExchange exchange)

Implements io.undertow.attribute.ExchangeAttribute.readAttribute.

Doc from io.undertow.attribute.ExchangeAttribute.readAttribute.

Resolve the attribute from the HTTP server exchange. This may return null if the attribute is not present.

Parameters
exchange:HttpServerExchange

The exchange

Returns:String

The attribute

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
writeAttributeback to summary
public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException

Implements io.undertow.attribute.ExchangeAttribute.writeAttribute.

Doc from io.undertow.attribute.ExchangeAttribute.writeAttribute.

Sets a new value for the attribute. Not all attributes are writable.

Parameters
exchange:HttpServerExchange

The exchange

newValue:String

The new value for the attribute

Annotations
@Override
Exceptions
ReadOnlyAttributeException:
when attribute cannot be written