ARG - Argument typeRET - Return type@FunctionalInterface public interface Invoker<ARG,RET>
Callable interface - accepts one argument
and possibly throws somethind| Modifier and Type | Method and Description |
|---|---|
RET |
invoke(ARG arg) |
static <ARG> void |
invokeAll(ARG arg,
Collection<? extends Invoker<? super ARG,?>> invokers)
Invokes all the instances ignoring the return value.
|
static <ARG> Pair<Invoker<? super ARG,?>,Throwable> |
invokeTillFirstFailure(ARG arg,
Collection<? extends Invoker<? super ARG,?>> invokers)
Invokes all instances until 1st failure (if any)
|
static <ARG> Invoker<ARG,Void> |
wrapAll(Collection<? extends Invoker<? super ARG,?>> invokers) |
static <ARG> Invoker<ARG,Void> |
wrapFirst(Collection<? extends Invoker<? super ARG,?>> invokers) |
static <ARG> Invoker<ARG,Void> wrapAll(Collection<? extends Invoker<? super ARG,?>> invokers)
static <ARG> void invokeAll(ARG arg,
Collection<? extends Invoker<? super ARG,?>> invokers)
throws Throwable
ARG - Argument typearg - The argument to pass to the invoke(Object) methodinvokers - The invokers to scan - ignored if null/empty
(also ignores null members)Throwable - If invocation failedstatic <ARG> Invoker<ARG,Void> wrapFirst(Collection<? extends Invoker<? super ARG,?>> invokers)
static <ARG> Pair<Invoker<? super ARG,?>,Throwable> invokeTillFirstFailure(ARG arg, Collection<? extends Invoker<? super ARG,?>> invokers)
ARG - Argument typearg - The argument to pass to the invoke(Object) methodinvokers - The invokers to scan - ignored if null/empty
(also ignores null members)Pair representing the first failed invocation
- null if all were successful (or none invoked).Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.