Package io.servicetalk.http.api
Class HttpRequestMethod.Properties
java.lang.Object
io.servicetalk.http.api.HttpRequestMethod.Properties
- Enclosing class:
- HttpRequestMethod
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HttpRequestMethod.Properties
As defined in Method Definitions, methods which are cacheable, but not safe or idempotent.static final HttpRequestMethod.Properties
As defined in Method Definitions, methods which are idempotent, but not safe or cacheable.static final HttpRequestMethod.Properties
As defined in Method Definitions, methods which are not safe, idempotent, or cacheable.static final HttpRequestMethod.Properties
As defined in Method Definitions, methods which are safe and idempotent, but not cacheable.static final HttpRequestMethod.Properties
As defined in Method Definitions, methods which are safe, idempotent, and cacheable. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
boolean
Cacheable Methods are those that allow for responses to be cached for future reuse.boolean
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 Details
-
SAFE_IDEMPOTENT_CACHEABLE
As defined in Method Definitions, methods which are safe, idempotent, and cacheable. -
SAFE_IDEMPOTENT
As defined in Method Definitions, methods which are safe and idempotent, but not cacheable. -
IDEMPOTENT
As defined in Method Definitions, methods which are idempotent, but not safe or cacheable. -
CACHEABLE
As defined in Method Definitions, methods which are cacheable, but not safe or idempotent. -
NONE
As defined in Method Definitions, methods which are not safe, idempotent, or cacheable.
-
-
Method Details
-
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
-
hashCode
public int hashCode()
-