java.lang.Object
io.helidon.inject.runtime.Invocation<V>
- Type Parameters:
V
- the invocation type
- All Implemented Interfaces:
Interceptor.Chain<V>
Handles the invocation of
Interceptor
methods.
Note that upon a successful call to the Interceptor.Chain.proceed(Object[])
or to the ultimate
target, the invocation will be prevented from being executed again.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <V> V
createInvokeAndSupply
(io.helidon.inject.api.InvocationContext ctx, Function<Object[], V> call, Object[] args) Creates an instance ofInvocation
and invokes it in this context.Deprecated.this method should only be called by generated codemergeAndCollapse
(List<Provider<T>>... lists) Merges a variable number of lists together, where the net result is the merged set of non-null providers ranked in proper weight order, or else empty list.Call the next interceptor in line, or finishing with the call to the service provider being intercepted.toString()
-
Method Details
-
toString
-
createInvokeAndSupply
public static <V> V createInvokeAndSupply(io.helidon.inject.api.InvocationContext ctx, Function<Object[], V> call, Object[] args) Creates an instance ofInvocation
and invokes it in this context.- Type Parameters:
V
- the type returned from the method element- Parameters:
ctx
- the invocation contextcall
- the call to the base service provider's methodargs
- the call arguments- Returns:
- the invocation instance
- Throws:
InvocationException
- if there are errors during invocation chain processing
-
mergeAndCollapse
Deprecated.this method should only be called by generated codeThe degenerate case formergeAndCollapse(List[])
. This is here only to eliminate the unchecked varargs compiler warnings that would otherwise be issued in code that does not have any interceptors on a method.- Type Parameters:
T
- the type of the provider- Returns:
- an empty list
-
mergeAndCollapse
Merges a variable number of lists together, where the net result is the merged set of non-null providers ranked in proper weight order, or else empty list.- Type Parameters:
T
- the type of the provider- Parameters:
lists
- the lists to merge- Returns:
- the merged result or empty list if there is o interceptor providers
-
proceed
Description copied from interface:Interceptor.Chain
Call the next interceptor in line, or finishing with the call to the service provider being intercepted. Note that that arguments are passed by reference to each interceptor ultimately leading up to the final call to the underlying intercepted target. Callers can mutate the arguments passed directly on the provided array instance.- Specified by:
proceed
in interfaceInterceptor.Chain<V>
- Parameters:
args
- the arguments passed- Returns:
- the result of the call
-