Top Description Fields Constructors Methods
io.undertow.attribute

public Class ExchangeAttributeParser

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Collections, .Comparator, .List, .ServiceLoader, io.undertow.UndertowLogger, .UndertowMessages

Attribute parser for exchange attributes. This builds an attribute from a string definition.

This uses a service loader mechanism to allow additional token types to be loaded. Token definitions are loaded from the provided class loader.

Author
Stuart Douglas
See Also
ExchangeAttributes#parser(ClassLoader)

Field Summary

Modifier and TypeField and Description
private final List<ExchangeAttributeBuilder>
private final List<ExchangeAttributeWrapper>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ExchangeAttribute
parse(final String valueString)

Parses the provided value string, and turns it into a list of exchange attributes.

public ExchangeAttribute
parseSingleToken(final String token)

private ExchangeAttribute
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

buildersback to summary
private final List<ExchangeAttributeBuilder> builders
wrappersback to summary
private final List<ExchangeAttributeWrapper> wrappers

Constructor Detail

ExchangeAttributeParserback to summary
pack-priv ExchangeAttributeParser(final ClassLoader classLoader, List<ExchangeAttributeWrapper> wrappers)

Method Detail

parseback to summary
public ExchangeAttribute parse(final String valueString)

Parses the provided value string, and turns it into a list of exchange attributes.

Tokens are created according to the following rules:

%a - % followed by single character. %% is an escape for a literal % %{.*}a? - % plus curly braces with any amount of content inside, followed by an optional character ${.*} - $ followed by a curly braces to reference an item from the predicate context

parseSingleTokenback to summary
public ExchangeAttribute parseSingleToken(final String token)
wrapback to summary
private ExchangeAttribute wrap(ExchangeAttribute attribute)