Top Inners Fields Constructors Methods
io.undertow.util

public Class ETagUtils

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Collections, .List, io.undertow.server.HttpServerExchange

Author
Stuart Douglas

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum

Field Summary

Modifier and TypeField and Description
private static final char
private static final char
private static final char
private static final char
W

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static ETag

Returns:

The ETag for the exchange, or null if the etag is not set
getETag
(final HttpServerExchange
The exchange
exchange
)

public static boolean
handleIfMatch(final HttpServerExchange
the exchange
exchange
,
final ETag
The etags
etag
,
boolean allowWeak)

Handles the if-match header.

public static boolean
handleIfMatch(final HttpServerExchange
the exchange
exchange
,
final List<ETag>
The etags
etags
,
boolean allowWeak)

Handles the if-match header.

public static boolean
handleIfMatch(final String
The if match header
ifMatch
,
final ETag
The etags
etag
,
boolean allowWeak)

Handles the if-match header.

public static boolean
handleIfMatch(final String
The ifMatch header
ifMatch
,
final List<ETag>
The etags
etags
,
boolean allowWeak)

Handles the if-match header.

public static boolean
handleIfNoneMatch(final HttpServerExchange
the exchange
exchange
,
final ETag
The etags
etag
,
boolean allowWeak)

Handles the if-none-match header.

public static boolean
handleIfNoneMatch(final HttpServerExchange
the exchange
exchange
,
final List<ETag>
The etags
etags
,
boolean allowWeak)

Handles the if-none-match header.

public static boolean
handleIfNoneMatch(final String
the header
ifNoneMatch
,
final ETag
The etags
etag
,
boolean allowWeak)

Handles the if-none-match header.

public static boolean
handleIfNoneMatch(final String
the header
ifNoneMatch
,
final List<ETag>
The etags
etags
,
boolean allowWeak)

Handles the if-none-match header.

public static List<ETag>
parseETagList(final String header)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

COMMAback to summary
private static final char COMMA
QUOTEback to summary
private static final char QUOTE
SLASHback to summary
private static final char SLASH
Wback to summary
private static final char W

Constructor Detail

ETagUtilsback to summary
public ETagUtils()

Method Detail

getETagback to summary
public static ETag getETag(final HttpServerExchange exchange)
Parameters
exchange:HttpServerExchange

The exchange

Returns:ETag

The ETag for the exchange, or null if the etag is not set

handleIfMatchback to summary
public static boolean handleIfMatch(final HttpServerExchange exchange, final ETag etag, boolean allowWeak)

Handles the if-match header. returns true if the request should proceed, false otherwise

Parameters
exchange:HttpServerExchange

the exchange

etag:ETag

The etags

handleIfMatchback to summary
public static boolean handleIfMatch(final HttpServerExchange exchange, final List<ETag> etags, boolean allowWeak)

Handles the if-match header. returns true if the request should proceed, false otherwise

Parameters
exchange:HttpServerExchange

the exchange

etags:List<ETag>

The etags

handleIfMatchback to summary
public static boolean handleIfMatch(final String ifMatch, final ETag etag, boolean allowWeak)

Handles the if-match header. returns true if the request should proceed, false otherwise

Parameters
ifMatch:String

The if match header

etag:ETag

The etags

handleIfMatchback to summary
public static boolean handleIfMatch(final String ifMatch, final List<ETag> etags, boolean allowWeak)

Handles the if-match header. returns true if the request should proceed, false otherwise

Parameters
ifMatch:String

The ifMatch header

etags:List<ETag>

The etags

handleIfNoneMatchback to summary
public static boolean handleIfNoneMatch(final HttpServerExchange exchange, final ETag etag, boolean allowWeak)

Handles the if-none-match header. returns true if the request should proceed, false otherwise

Parameters
exchange:HttpServerExchange

the exchange

etag:ETag

The etags

handleIfNoneMatchback to summary
public static boolean handleIfNoneMatch(final HttpServerExchange exchange, final List<ETag> etags, boolean allowWeak)

Handles the if-none-match header. returns true if the request should proceed, false otherwise

Parameters
exchange:HttpServerExchange

the exchange

etags:List<ETag>

The etags

handleIfNoneMatchback to summary
public static boolean handleIfNoneMatch(final String ifNoneMatch, final ETag etag, boolean allowWeak)

Handles the if-none-match header. returns true if the request should proceed, false otherwise

Parameters
ifNoneMatch:String

the header

etag:ETag

The etags

handleIfNoneMatchback to summary
public static boolean handleIfNoneMatch(final String ifNoneMatch, final List<ETag> etags, boolean allowWeak)

Handles the if-none-match header. returns true if the request should proceed, false otherwise

Parameters
ifNoneMatch:String

the header

etags:List<ETag>

The etags

parseETagListback to summary
public static List<ETag> parseETagList(final String header)
io.undertow.util back to summary

pack-priv final Enum ETagUtils.SearchingFor

extends Enum<ETagUtils.SearchingFor>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final ETagUtils.SearchingFor
public static final ETagUtils.SearchingFor
public static final ETagUtils.SearchingFor
public static final ETagUtils.SearchingFor

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ETagUtils.SearchingFor
public static ETagUtils.SearchingFor[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

END_OF_VALUEback to summary
public static final ETagUtils.SearchingFor END_OF_VALUE
LAST_QUOTEback to summary
public static final ETagUtils.SearchingFor LAST_QUOTE
START_OF_VALUEback to summary
public static final ETagUtils.SearchingFor START_OF_VALUE
WEAK_SLASHback to summary
public static final ETagUtils.SearchingFor WEAK_SLASH

Constructor Detail

SearchingForback to summary
private SearchingFor()

Method Detail

valueOfback to summary
public static ETagUtils.SearchingFor valueOf(String name)
valuesback to summary
public static ETagUtils.SearchingFor[] values()