Class FaultToleranceServiceImpl
- java.lang.Object
-
- fish.payara.microprofile.faulttolerance.service.FaultToleranceServiceImpl
-
- All Implemented Interfaces:
FaultToleranceService,FaultToleranceRequestTracing,fish.payara.monitoring.collect.MonitoringDataSource,EventListener
@ContractsProvided(FaultToleranceService.class) @Service(name="microprofile-fault-tolerance-service") @RunLevel(10) public class FaultToleranceServiceImpl extends Object implements EventListener, FaultToleranceService, fish.payara.monitoring.collect.MonitoringDataSource, FaultToleranceRequestTracing
Base Service for MicroProfile Fault Tolerance.- Author:
- Andrew Pielage, Jan Bernitt (2.0)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.api.event.EventListener
EventListener.Event<T>
-
-
Constructor Summary
Constructors Constructor Description FaultToleranceServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcollect(fish.payara.monitoring.collect.MonitoringDataCollector collector)voidendSpan()voidevent(EventListener.Event<?> event)Process a Glassfish/Payara eventFaultToleranceConfiggetConfig(jakarta.interceptor.InvocationContext context, Stereotypes stereotypes)Creates an instance of aFaultToleranceConfigbound to the givenInvocationContextandStereotypeslookup.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.voidpostConstruct()voidstartSpan(RequestTraceSpan span, jakarta.interceptor.InvocationContext context)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface fish.payara.microprofile.faulttolerance.FaultToleranceService
getMethodContext
-
-
-
-
Method Detail
-
postConstruct
@PostConstruct public void postConstruct()
-
event
public void event(EventListener.Event<?> event)
Description copied from interface:EventListenerProcess a Glassfish/Payara event- Specified by:
eventin interfaceEventListener
-
collect
public void collect(fish.payara.monitoring.collect.MonitoringDataCollector collector)
- Specified by:
collectin interfacefish.payara.monitoring.collect.MonitoringDataSource
-
getConfig
public FaultToleranceConfig getConfig(jakarta.interceptor.InvocationContext context, Stereotypes stereotypes)
Description copied from interface:FaultToleranceServiceCreates an instance of aFaultToleranceConfigbound to the givenInvocationContextandStereotypeslookup.- Specified by:
getConfigin interfaceFaultToleranceService- Parameters:
context- currently processed contextstereotypes- way to lookup sterotype annotations- Returns:
- a thread safe
FaultToleranceConfiginstance bound to the given context
-
startSpan
public void startSpan(RequestTraceSpan span, jakarta.interceptor.InvocationContext context)
- Specified by:
startSpanin interfaceFaultToleranceRequestTracing
-
endSpan
public void endSpan()
- Specified by:
endSpanin interfaceFaultToleranceRequestTracing
-
getMethodContext
public FaultToleranceMethodContext getMethodContext(jakarta.interceptor.InvocationContext context, FaultTolerancePolicy policy, jakarta.enterprise.context.control.RequestContextController requestContextController)
Description copied from interface:FaultToleranceServiceGet or create the context object for processing the annotated method represented by the givenInvocationContext.- Specified by:
getMethodContextin interfaceFaultToleranceService- 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.
-
-