Package io.servicetalk.http.api
Class HttpRequestMethod.Properties
- java.lang.Object
-
- io.servicetalk.http.api.HttpRequestMethod.Properties
-
- Enclosing class:
- HttpRequestMethod
public static final class HttpRequestMethod.Properties extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static HttpRequestMethod.Properties
CACHEABLE
As defined in Method Definitions, methods which are cacheable, but not safe or idempotent.static HttpRequestMethod.Properties
IDEMPOTENT
As defined in Method Definitions, methods which are idempotent, but not safe or cacheable.static HttpRequestMethod.Properties
NONE
As defined in Method Definitions, methods which are not safe, idempotent, or cacheable.static HttpRequestMethod.Properties
SAFE_IDEMPOTENT
As defined in Method Definitions, methods which are safe and idempotent, but not cacheable.static HttpRequestMethod.Properties
SAFE_IDEMPOTENT_CACHEABLE
As defined in Method Definitions, methods which are safe, idempotent, and cacheable.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
int
hashCode()
boolean
isCacheable()
Cacheable Methods are those that allow for responses to be cached for future reuse.boolean
isIdempotent()
Idempotent Methods are those that the same action can be repeated indefinitely without changing semantics.boolean
isSafe()
Safe Methods are those that are essentially read-only.static HttpRequestMethod.Properties
newRequestMethodProperties(boolean safe, boolean idempotent, boolean cacheable)
-
-
-
Field Detail
-
SAFE_IDEMPOTENT_CACHEABLE
public static final HttpRequestMethod.Properties SAFE_IDEMPOTENT_CACHEABLE
As defined in Method Definitions, methods which are safe, idempotent, and cacheable.
-
SAFE_IDEMPOTENT
public static final HttpRequestMethod.Properties SAFE_IDEMPOTENT
As defined in Method Definitions, methods which are safe and idempotent, but not cacheable.
-
IDEMPOTENT
public static final HttpRequestMethod.Properties IDEMPOTENT
As defined in Method Definitions, methods which are idempotent, but not safe or cacheable.
-
CACHEABLE
public static final HttpRequestMethod.Properties CACHEABLE
As defined in Method Definitions, methods which are cacheable, but not safe or idempotent.
-
NONE
public static final HttpRequestMethod.Properties NONE
As defined in Method Definitions, methods which are not safe, idempotent, or cacheable.
-
-
Method Detail
-
newRequestMethodProperties
public static HttpRequestMethod.Properties newRequestMethodProperties(boolean safe, boolean idempotent, boolean cacheable)
Create a newHttpRequestMethod.Properties
object for specifiedsafe
,idempotent
, andcacheable
. Generally, the constants inHttpRequestMethod.Properties
should be used.- Parameters:
safe
-true
if a safe methodidempotent
-true
if a idempotent methodcacheable
-true
if a cacheable method- Returns:
- a new
HttpRequestMethod.Properties
instance.
-
isSafe
public boolean isSafe()
Safe Methods are those that are essentially read-only.- Returns:
true
if a safe method
-
isIdempotent
public boolean isIdempotent()
Idempotent Methods are those that the same action can be repeated indefinitely without changing semantics.- Returns:
true
if an idempotent method
-
isCacheable
public boolean isCacheable()
Cacheable Methods are those that allow for responses to be cached for future reuse.- Returns:
true
if a cacheable method
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-