Class Policy
- java.lang.Object
-
- fish.payara.microprofile.faulttolerance.policy.Policy
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AsynchronousPolicy
,BulkheadPolicy
,CircuitBreakerPolicy
,FallbackPolicy
,RetryPolicy
,TimeoutPolicy
public abstract class Policy extends Object implements Serializable
Contains general helper method for FT policy validation.- Author:
- Jan Bernitt
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Policy()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
checkAtLeast(double minimum, Method annotatedMethod, Class<? extends Annotation> annotationType, String attribute, double value)
static void
checkAtLeast(long minimum, Method annotatedMethod, Class<? extends Annotation> annotationType, String attribute, long value)
static void
checkAtLeast(String attribute1, long minimum, Method annotatedMethod, Class<? extends Annotation> annotationType, String attribute2, long value)
static void
checkAtMost(double maximum, Method annotatedMethod, Class<? extends Annotation> annotationType, String attribute, double value)
static void
checkReturnsSameAs(Method annotatedMethod, Class<? extends Annotation> annotationType, String attribute, Class<?> valueType, String valueMethodName, Class<?>... valueParameterTypes)
static void
checkReturnsSameAs(Method annotatedMethod, Class<? extends Annotation> annotationType, String attribute, Method value)
protected static String
describe(Method annotatedMethod, Class<? extends Annotation> annotationType, String attribute)
static boolean
isCaught(Throwable ex, Class<? extends Throwable>[] caught)
-
-
-
Method Detail
-
checkAtLeast
public static void checkAtLeast(long minimum, Method annotatedMethod, Class<? extends Annotation> annotationType, String attribute, long value)
-
checkAtLeast
public static void checkAtLeast(double minimum, Method annotatedMethod, Class<? extends Annotation> annotationType, String attribute, double value)
-
checkAtLeast
public static void checkAtLeast(String attribute1, long minimum, Method annotatedMethod, Class<? extends Annotation> annotationType, String attribute2, long value)
-
checkAtMost
public static void checkAtMost(double maximum, Method annotatedMethod, Class<? extends Annotation> annotationType, String attribute, double value)
-
checkReturnsSameAs
public static void checkReturnsSameAs(Method annotatedMethod, Class<? extends Annotation> annotationType, String attribute, Class<?> valueType, String valueMethodName, Class<?>... valueParameterTypes)
-
checkReturnsSameAs
public static void checkReturnsSameAs(Method annotatedMethod, Class<? extends Annotation> annotationType, String attribute, Method value)
-
describe
protected static String describe(Method annotatedMethod, Class<? extends Annotation> annotationType, String attribute)
-
-