Top Description Fields Constructors Methods
io.undertow.server.protocol.http

pack-priv Class ParseState

extends Object
Class Inheritance
Imports
io.undertow.util.HttpString

The current state of the tokenizer state machine. This class is mutable and not thread safe.

As the machine changes state this class is updated rather than allocating a new one each time. fields are not private to allow for efficient putfield / getfield access Fields can mean different things depending on the current state. This means that names may not always reflect complete functionality. This class is re-used for requests on the same connection.

Author
Stuart Douglas

Field Summary

Modifier and TypeField and Description
public static final int
pack-priv final StringBuilder
canonicalPath

We need to keep track of the canonical path

pack-priv HttpString
current

If this state is a prefix or terminal match state this is set to the string that is a candidate to be matched

pack-priv byte[]
currentBytes

The bytes version of current

pack-priv final StringBuilder
public static final int
public static final int
pack-priv final CacheMap<HttpString, String>
headerValuesCache

In general browsers will often send the same header with every request.

pack-priv byte
leftOver

This has different meanings depending on the current state.

pack-priv int
pack-priv HttpString
nextHeader

This is used to store the next header value when parsing header key / value pairs,

pack-priv String
public static final int
pack-priv int
parseState

The current state in the tokenizer state machine.

public static final int
public static final int
pack-priv int
pos

If this state is a prefix match state then this holds the current position in the string.

public static final int
pack-priv int
state

The actual state of request parsing

pack-priv final StringBuilder
stringBuilder

If this is in io.undertow.annotationprocessor.AbstractParserGenerator#NO_STATE then this holds the current token that has been read so far.

pack-priv boolean
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
pack-priv
ParseState(int cacheSize)

Method Summary

Modifier and TypeMethod and Description
public boolean
public final void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

AFTER_VERSIONback to summary
public static final int AFTER_VERSION
canonicalPathback to summary
pack-priv final StringBuilder canonicalPath

We need to keep track of the canonical path

currentback to summary
pack-priv HttpString current

If this state is a prefix or terminal match state this is set to the string that is a candidate to be matched

currentBytesback to summary
pack-priv byte[] currentBytes

The bytes version of current

decodeBufferback to summary
pack-priv final StringBuilder decodeBuffer
HEADER_VALUEback to summary
public static final int HEADER_VALUE
headerValuesCacheback to summary
pack-priv final CacheMap<HttpString, String> headerValuesCache

In general browsers will often send the same header with every request. This cache allows us to re-use the resulting strings.

leftOverback to summary
pack-priv byte leftOver

This has different meanings depending on the current state. In state HEADER it is a the first character of the header, that was read by HEADER_VALUE to see if this was a continuation. In state HEADER_VALUE if represents the last character that was seen.

mapCountback to summary
pack-priv int mapCount
nextHeaderback to summary
pack-priv HttpString nextHeader

This is used to store the next header value when parsing header key / value pairs,

nextQueryParamback to summary
pack-priv String nextQueryParam
PARSE_COMPLETEback to summary
public static final int PARSE_COMPLETE
parseStateback to summary
pack-priv int parseState

The current state in the tokenizer state machine.

PATHback to summary
public static final int PATH
PATH_PARAMETERSback to summary
public static final int PATH_PARAMETERS
posback to summary
pack-priv int pos

If this state is a prefix match state then this holds the current position in the string.

QUERY_PARAMETERSback to summary
public static final int QUERY_PARAMETERS
stateback to summary
pack-priv int state

The actual state of request parsing

stringBuilderback to summary
pack-priv final StringBuilder stringBuilder

If this is in io.undertow.annotationprocessor.AbstractParserGenerator#NO_STATE then this holds the current token that has been read so far.

urlDecodeRequiredback to summary
pack-priv boolean urlDecodeRequired
VERBback to summary
public static final int VERB
VERSIONback to summary
public static final int VERSION

Constructor Detail

ParseStateback to summary
pack-priv ParseState(int cacheSize)

Method Detail

isCompleteback to summary
public boolean isComplete()
parseCompleteback to summary
public final void parseComplete()
resetback to summary
public void reset()