@Documented @Retention(value=RUNTIME) @Target(value=METHOD) @Inherited @InterceptorBinding public @interface Fallback
FallbackHandler.handle(ExecutionContext)
on the specified handler to execute
the fallback.FaultToleranceDefinitionException
must be thrown.When a method returns and the fallback policy is present, the following rules are applied:
skipOn()
parameter, the thrown object
will be rethrown.
applyOn()
parameter, the fallback
policy, detailed above, will be applied.
Throwable
which is not an Error
or Exception
, non-portable behavior
results.value()
,
fallbackMethod()
,
applyOn()
,
skipOn()
Modifier and Type | Optional Element and Description |
---|---|
Class<? extends Throwable>[] |
applyOn
The list of exception types which should trigger Fallback
|
String |
fallbackMethod
Specify the method name to fallback to.
|
Class<? extends Throwable>[] |
skipOn
The list of exception types which should not trigger Fallback
|
Class<? extends FallbackHandler<?>> |
value
Specify the fallback class to be used.
|
public abstract Class<? extends FallbackHandler<?>> value
FaultToleranceDefinitionException
occurs.public abstract String fallbackMethod
FaultToleranceDefinitionException
must be thrown.public abstract Class<? extends Throwable>[] applyOn
Note that if a method throws a Throwable
which is not an Error
or Exception
, non-portable
behavior results.
public abstract Class<? extends Throwable>[] skipOn
This list takes priority over the types listed in applyOn()
Note that if a method throws a Throwable
which is not an Error
or Exception
, non-portable
behavior results.
Copyright © 2016 – 2022 Eclipse Foundation. All rights reserved.
Use is subject to license terms.