io.undertow.util

## Class ETagUtils

- java.lang.Object
- - io.undertow.util.ETagUtils

    public class ETagUtils
    extends Object

Author:
  Stuart Douglas

### Constructor Summary

Constructors
Constructor and Description
`ETagUtils()`

### Method Summary

All Methods Static Methods Concrete Methods
`static ETag` `getETag(HttpServerExchange exchange)`
`static boolean` `handleIfMatch(HttpServerExchange exchange, ETag etag, boolean allowWeak)` Handles the if-match header.
`static boolean` `handleIfMatch(HttpServerExchange exchange, List<ETag> etags, boolean allowWeak)` Handles the if-match header.
`static boolean` `handleIfMatch(String ifMatch, ETag etag, boolean allowWeak)` Handles the if-match header.
`static boolean` `handleIfMatch(String ifMatch, List<ETag> etags, boolean allowWeak)` Handles the if-match header.
`static boolean` `handleIfNoneMatch(HttpServerExchange exchange, ETag etag, boolean allowWeak)` Handles the if-none-match header.
`static boolean` `handleIfNoneMatch(HttpServerExchange exchange, List<ETag> etags, boolean allowWeak)` Handles the if-none-match header.
`static boolean` `handleIfNoneMatch(String ifNoneMatch, ETag etag, boolean allowWeak)` Handles the if-none-match header.
`static boolean` `handleIfNoneMatch(String ifNoneMatch, List<ETag> etags, boolean allowWeak)` Handles the if-none-match header.
`static List<ETag>` `parseETagList(String header)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ETagUtils

    public ETagUtils()

### Method Detail

#### handleIfMatch

    public static boolean handleIfMatch(HttpServerExchange exchange,
                                        ETag etag,
                                        boolean allowWeak)

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

Parameters:
  `exchange` - the exchange
  `etag` - The etags
Returns:

#### handleIfMatch

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

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

Parameters:
  `exchange` - the exchange
  `etags` - The etags
Returns:

#### handleIfMatch

    public static boolean handleIfMatch(String ifMatch,
                                        ETag etag,
                                        boolean allowWeak)

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

Parameters:
  `ifMatch` - The if match header
  `etag` - The etags
Returns:

#### handleIfMatch

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

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

Parameters:
  `ifMatch` - The ifMatch header
  `etags` - The etags
Returns:

#### handleIfNoneMatch

    public static boolean handleIfNoneMatch(HttpServerExchange exchange,
                                            ETag etag,
                                            boolean allowWeak)

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

Parameters:
  `exchange` - the exchange
  `etag` - The etags
Returns:

#### handleIfNoneMatch

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

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

Parameters:
  `exchange` - the exchange
  `etags` - The etags
Returns:

#### handleIfNoneMatch

    public static boolean handleIfNoneMatch(String ifNoneMatch,
                                            ETag etag,
                                            boolean allowWeak)

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

Parameters:
  `ifNoneMatch` - the header
  `etag` - The etags
Returns:

#### handleIfNoneMatch

    public static boolean handleIfNoneMatch(String ifNoneMatch,
                                            List<ETag> etags,
                                            boolean allowWeak)

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

Parameters:
  `ifNoneMatch` - the header
  `etags` - The etags
Returns:

#### parseETagList

    public static List<ETag> parseETagList(String header)

#### getETag

    public static ETag getETag(HttpServerExchange exchange)

Parameters:
  `exchange` - The exchange
Returns:
  The ETag for the exchange, or null if the etag is not set