Interface FaultToleranceService
-
- All Known Implementing Classes:
FaultToleranceServiceImpl
public interface FaultToleranceServiceEssentially a list of all methods needed to process FT behaviour. Decouples the FT processing facilities and state from any specific implementation to allow e.g. unit testing.- Author:
- Jan Bernitt
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description FaultToleranceConfiggetConfig(jakarta.interceptor.InvocationContext context, Stereotypes stereotypes)Creates an instance of aFaultToleranceConfigbound to the givenInvocationContextandStereotypeslookup.default FaultToleranceMethodContextgetMethodContext(jakarta.interceptor.InvocationContext context, FaultTolerancePolicy policy)FaultToleranceMethodContextgetMethodContext(jakarta.interceptor.InvocationContext context, FaultTolerancePolicy policy, jakarta.enterprise.context.control.RequestContextController requestContextController)Get or create the context object for processing the annotated method represented by the givenInvocationContext.
-
-
-
Method Detail
-
getConfig
FaultToleranceConfig getConfig(jakarta.interceptor.InvocationContext context, Stereotypes stereotypes)
Creates an instance of aFaultToleranceConfigbound to the givenInvocationContextandStereotypeslookup.- Parameters:
context- currently processed contextstereotypes- way to lookup sterotype annotations- Returns:
- a thread safe
FaultToleranceConfiginstance bound to the given context
-
getMethodContext
FaultToleranceMethodContext getMethodContext(jakarta.interceptor.InvocationContext context, FaultTolerancePolicy policy, jakarta.enterprise.context.control.RequestContextController requestContextController)
Get or create the context object for processing the annotated method represented by the givenInvocationContext.- Parameters:
context- represents the FT annotated method being calledpolicy- the policy being used for this executionrequestContextController- the controller to use or null- Returns:
- the
FaultToleranceMethodContextto use to process the method invocation with FT semantics. This is a context specific to the target object and called method.
-
getMethodContext
default FaultToleranceMethodContext getMethodContext(jakarta.interceptor.InvocationContext context, FaultTolerancePolicy policy)
-
-