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.PropertiesCACHEABLEAs defined in Method Definitions, methods which are cacheable, but not safe or idempotent.static HttpRequestMethod.PropertiesIDEMPOTENTAs defined in Method Definitions, methods which are idempotent, but not safe or cacheable.static HttpRequestMethod.PropertiesNONEAs defined in Method Definitions, methods which are not safe, idempotent, or cacheable.static HttpRequestMethod.PropertiesSAFE_IDEMPOTENTAs defined in Method Definitions, methods which are safe and idempotent, but not cacheable.static HttpRequestMethod.PropertiesSAFE_IDEMPOTENT_CACHEABLEAs 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 booleanequals(java.lang.Object o)inthashCode()booleanisCacheable()Cacheable Methods are those that allow for responses to be cached for future reuse.booleanisIdempotent()Idempotent Methods are those that the same action can be repeated indefinitely without changing semantics.booleanisSafe()Safe Methods are those that are essentially read-only.static HttpRequestMethod.PropertiesnewRequestMethodProperties(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.Propertiesobject for specifiedsafe,idempotent, andcacheable. Generally, the constants inHttpRequestMethod.Propertiesshould be used.- Parameters:
safe-trueif a safe methodidempotent-trueif a idempotent methodcacheable-trueif a cacheable method- Returns:
- a new
HttpRequestMethod.Propertiesinstance.
-
isSafe
public boolean isSafe()
Safe Methods are those that are essentially read-only.- Returns:
trueif a safe method
-
isIdempotent
public boolean isIdempotent()
Idempotent Methods are those that the same action can be repeated indefinitely without changing semantics.- Returns:
trueif an idempotent method
-
isCacheable
public boolean isCacheable()
Cacheable Methods are those that allow for responses to be cached for future reuse.- Returns:
trueif a cacheable method
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-