Interface HelidonInterceptor<W>
- Type Parameters:
- W- type of the work item processed by the interceptor
- All Known Subinterfaces:
- HelidonInterceptor.WithPostCompletion<W>
- All Known Implementing Classes:
- HelidonInterceptor.Base
Executable.
 
     Implementing classes typically extend HelidonInterceptor.Base.
 
     See also the HelidonInterceptor.WithPostCompletion interface.
 
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic classHelidonInterceptorimplementation providing as much logic as possible.static interfaceCommon behavior among interceptors with both pre-invocation and post-completion behavior.
- 
Method SummaryModifier and TypeMethodDescriptionaroundConstruct(jakarta.interceptor.InvocationContext context) Invoked during the intercepted constructor invocation.default ObjectaroundConstruction(jakarta.interceptor.InvocationContext context) Invokes the implementation'spreInvocationlogic for a constructor, once for each work item associated with the constructor.default ObjectaroundInvocation(jakarta.interceptor.InvocationContext context) Invokes the implementation's preInvocation logic for a method, once for each work item associated with the method.aroundInvoke(jakarta.interceptor.InvocationContext context) Invoked during the intercepted method invocation.voidpreInvocation(jakarta.interceptor.InvocationContext context, W workItem) Performs whatever pre-invocation work is needed for the given context, applied to the specified work item.workItems(Executable executable) Returns the work items the specific interceptor instance should process.
- 
Method Details- 
aroundConstructionInvokes the implementation'spreInvocationlogic for a constructor, once for each work item associated with the constructor.- Parameters:
- context-- InvocationContext
- Returns:
- any value returned by the intercepted Executable
- Throws:
- Exception- when the intercepted code throws an exception
 
- 
aroundConstructInvoked during the intercepted constructor invocation.Typically, concrete implementations should extend HelidonInterceptor.Basewhich implements this method with@AroundConstruct. Annotation processing for@AroundConstructdoes not recognize the annotation on adefaultmethod implementation defined on the interface.- Parameters:
- context- the invocation context for the intercepted call
- Returns:
- the value returned from the intercepted constructor
- Throws:
- Exception- if the invoked constructor throws an exception
 
- 
aroundInvocationInvokes the implementation's preInvocation logic for a method, once for each work item associated with the method.- Parameters:
- context-- InvocationContext
- Returns:
- any value returned by the intercepted Executable
- Throws:
- Exception- when the intercepted code throws an exception
 
- 
aroundInvokeInvoked during the intercepted method invocation.Typically, concrete implementations should extend HelidonInterceptor.Basewhich implements this method with@AroundInvoke. Annotation processing for@AroundInvokedoes not recognize the annotation on adefaultmethod implementation defined on the interface.- Parameters:
- context- the invocation context for the intercepted call
- Returns:
- the value returned from the intercepted method
- Throws:
- Exception- if the invoked method throws an exception
 
- 
workItemsReturns the work items the specific interceptor instance should process.- Parameters:
- executable- the specific- Executablebeing intercepted
- Returns:
- the work items pertinent to the specified Executable
 
- 
preInvocationPerforms whatever pre-invocation work is needed for the given context, applied to the specified work item.If the pre-invocation handler throws an exception, any other pre-invocation - Parameters:
- context-- InvocationContextfor the execution being intercepted
- workItem- the work item on which to operate
 
 
-