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.PropertiesAs defined in Method Definitions, methods which are cacheable, but not safe or idempotent.static final HttpRequestMethod.PropertiesAs defined in Method Definitions, methods which are idempotent, but not safe or cacheable.static final HttpRequestMethod.PropertiesAs defined in Method Definitions, methods which are not safe, idempotent, or cacheable.static final HttpRequestMethod.PropertiesAs defined in Method Definitions, methods which are safe and idempotent, but not cacheable.static final HttpRequestMethod.PropertiesAs defined in Method Definitions, methods which are safe, idempotent, and cacheable. -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()booleanCacheable Methods are those that allow for responses to be cached for future reuse.booleanIdempotent 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 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.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
-
hashCode
public int hashCode()
-