Package org.apache.juneau.http.remote
Record Class RrpcInterfaceMethodMeta.Policy
java.lang.Object
java.lang.Record
org.apache.juneau.http.remote.RrpcInterfaceMethodMeta.Policy
- Record Components:
interceptors- The interceptor classes to apply (each must implement the client-side interceptor SPI).timeout- The per-call response timeout as a duration string (empty = none).retries- The max retry attempts (0 = disabled).retryNonIdempotent- Whether to allow retrying non-idempotent verbs (POST/PATCH).throwOnError- Whether to throw a generic exception on an unmatched error response.
- Enclosing class:
- RrpcInterfaceMethodMeta
public static record RrpcInterfaceMethodMeta.Policy(Class<?>[] interceptors, String timeout, int retries, boolean retryNonIdempotent, boolean throwOnError)
extends Record
Method-level cross-cutting call policy: interceptors, per-call timeout, retries, and the
generic
throwOnError flag, sourced from @RemoteOp/verb annotation members.
Kept as a single carrier so the (already busy) method-meta constructor isn't flooded with scalar arguments.
The interceptors are stored as raw Class<?>[] (rather than Class<? extends
RestCallInterceptor>[]) because RestCallInterceptor lives in the juneau-rest-client module, which
this module must not depend on; they are resolved to interceptor instances by the next-gen RemoteClient.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RrpcInterfaceMethodMeta.PolicyThe empty (no-op) policy used for methods that declare none of the cross-cutting policy members. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.Class<?>[]Returns the value of theinterceptorsrecord component.intretries()Returns the value of theretriesrecord component.booleanReturns the value of theretryNonIdempotentrecord component.booleanReturns the value of thethrowOnErrorrecord component.timeout()Returns the value of thetimeoutrecord component.toString()Returns a string representation of this record class.
-
Field Details
-
NONE
The empty (no-op) policy used for methods that declare none of the cross-cutting policy members.
-
-
Constructor Details
-
Method Details
-
interceptors
Returns the value of theinterceptorsrecord component.- Returns:
- the value of the
interceptorsrecord component
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
timeout
Returns the value of thetimeoutrecord component.- Returns:
- the value of the
timeoutrecord component
-
retries
Returns the value of theretriesrecord component.- Returns:
- the value of the
retriesrecord component
-
retryNonIdempotent
Returns the value of theretryNonIdempotentrecord component.- Returns:
- the value of the
retryNonIdempotentrecord component
-
throwOnError
Returns the value of thethrowOnErrorrecord component.- Returns:
- the value of the
throwOnErrorrecord component
-