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,
java.util.Collection<? extends Invoker<? super ARG,?>> invokers)
Invokes all the instances ignoring the return value.
|
static <ARG> java.util.AbstractMap.SimpleImmutableEntry<Invoker<? super ARG,?>,java.lang.Throwable> |
invokeTillFirstFailure(ARG arg,
java.util.Collection<? extends Invoker<? super ARG,?>> invokers)
Invokes all instances until 1st failure (if any)
|
static <ARG> Invoker<ARG,java.lang.Void> |
wrapAll(java.util.Collection<? extends Invoker<? super ARG,?>> invokers) |
static <ARG> Invoker<ARG,java.lang.Void> |
wrapFirst(java.util.Collection<? extends Invoker<? super ARG,?>> invokers) |
static <ARG> Invoker<ARG,java.lang.Void> wrapAll(java.util.Collection<? extends Invoker<? super ARG,?>> invokers)
static <ARG> void invokeAll(ARG arg,
java.util.Collection<? extends Invoker<? super ARG,?>> invokers)
throws java.lang.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)java.lang.Throwable - If invocation failedstatic <ARG> Invoker<ARG,java.lang.Void> wrapFirst(java.util.Collection<? extends Invoker<? super ARG,?>> invokers)
static <ARG> java.util.AbstractMap.SimpleImmutableEntry<Invoker<? super ARG,?>,java.lang.Throwable> invokeTillFirstFailure(ARG arg, java.util.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)AbstractMap.SimpleImmutableEntry representing the first failed
invocation - null if all were successful (or none invoked).