C
- the public type of the contextual objectpublic interface Contextual<C extends Contextual<C>>
Modifier and Type | Method and Description |
---|---|
ContextManager<C> |
getInstanceContextManager()
Get the context manager for this object.
|
default void |
run(java.lang.Runnable runnable)
Run the given task with this contextual object selected.
|
default <R> R |
runAction(java.security.PrivilegedAction<R> action)
Run the given task with this contextual object selected.
|
default <T,U> void |
runBiConsumer(java.util.function.BiConsumer<T,U> consumer,
T param1,
U param2)
Run the given task with this contextual object selected.
|
default <T,U,R> R |
runBiFunction(java.util.function.BiFunction<T,U,R> function,
T param1,
U param2)
Run the given task with this contextual object selected.
|
default <T,U> boolean |
runBiPredicate(java.util.function.BiPredicate<T,U> predicate,
T param1,
U param2)
Run the given task with this contextual object selected.
|
default <V> V |
runCallable(java.util.concurrent.Callable<V> callable)
Run the given task with this contextual object selected.
|
default <T> void |
runConsumer(java.util.function.Consumer<T> consumer,
T param)
Run the given task with this contextual object selected.
|
default <T,U,E extends java.lang.Exception> |
runExBiConsumer(ExceptionBiConsumer<T,U,E> consumer,
T param1,
U param2)
Run the given task with this contextual object selected.
|
default <T,U,R,E extends java.lang.Exception> |
runExBiFunction(ExceptionBiFunction<T,U,R,E> function,
T param1,
U param2)
Run the given task with this contextual object selected.
|
default <T,U,E extends java.lang.Exception> |
runExBiPredicate(ExceptionBiPredicate<T,U,E> predicate,
T param1,
U param2)
Run the given task with this contextual object selected.
|
default <R> R |
runExceptionAction(java.security.PrivilegedExceptionAction<R> action)
Run the given task with this contextual object selected.
|
default <T,E extends java.lang.Exception> |
runExConsumer(ExceptionConsumer<T,E> consumer,
T param)
Run the given task with this contextual object selected.
|
default <T,R,E extends java.lang.Exception> |
runExFunction(ExceptionFunction<T,R,E> function,
T param)
Run the given task with this contextual object selected.
|
default <T,E extends java.lang.Exception> |
runExIntFunction(ExceptionIntFunction<T,E> function,
int value)
Run the given task with this contextual object selected.
|
default <T,E extends java.lang.Exception> |
runExLongFunction(ExceptionLongFunction<T,E> function,
long value)
Run the given task with this contextual object selected.
|
default <T,E extends java.lang.Exception> |
runExPredicate(ExceptionPredicate<T,E> predicate,
T param)
Run the given task with this contextual object selected.
|
default <T,R> R |
runFunction(java.util.function.Function<T,R> function,
T param)
Run the given task with this contextual object selected.
|
default <T> T |
runIntFunction(java.util.function.IntFunction<T> function,
int value)
Run the given task with this contextual object selected.
|
default <T> T |
runLongFunction(java.util.function.LongFunction<T> function,
long value)
Run the given task with this contextual object selected.
|
default <T> boolean |
runPredicate(java.util.function.Predicate<T> predicate,
T param)
Run the given task with this contextual object selected.
|
@NotNull ContextManager<C> getInstanceContextManager()
null
)default void run(java.lang.Runnable runnable)
runnable
- the task to run (must not be null
)default <R> R runAction(java.security.PrivilegedAction<R> action)
R
- the return value typeaction
- the task to run (must not be null
)default <R> R runExceptionAction(java.security.PrivilegedExceptionAction<R> action) throws java.security.PrivilegedActionException
R
- the return value typeaction
- the task to run (must not be null
)java.security.PrivilegedActionException
- if the action fails with an exceptiondefault <V> V runCallable(java.util.concurrent.Callable<V> callable) throws java.lang.Exception
V
- the return value typecallable
- the task to run (must not be null
)java.lang.Exception
default <T,U> void runBiConsumer(java.util.function.BiConsumer<T,U> consumer, T param1, U param2)
T
- the first parameter typeU
- the second parameter typeconsumer
- the task to run (must not be null
)param1
- the first parameter to pass to the taskparam2
- the second parameter to pass to the taskdefault <T,U,E extends java.lang.Exception> void runExBiConsumer(ExceptionBiConsumer<T,U,E> consumer, T param1, U param2) throws E extends java.lang.Exception
T
- the first parameter typeU
- the second parameter typeE
- the exception typeconsumer
- the task to run (must not be null
)param1
- the first parameter to pass to the taskparam2
- the second parameter to pass to the taskE
- if an exception occurs in the taskE extends java.lang.Exception
default <T> void runConsumer(java.util.function.Consumer<T> consumer, T param)
T
- the parameter typeconsumer
- the task to run (must not be null
)param
- the parameter to pass to the taskdefault <T,E extends java.lang.Exception> void runExConsumer(ExceptionConsumer<T,E> consumer, T param) throws E extends java.lang.Exception
T
- the parameter typeE
- the exception typeconsumer
- the task to run (must not be null
)param
- the parameter to pass to the taskE
- if an exception occurs in the taskE extends java.lang.Exception
default <T,U,R> R runBiFunction(java.util.function.BiFunction<T,U,R> function, T param1, U param2)
T
- the first parameter typeU
- the second parameter typeR
- the return value typefunction
- the task to run (must not be null
)param1
- the first parameter to pass to the taskparam2
- the second parameter to pass to the taskdefault <T,U,R,E extends java.lang.Exception> R runExBiFunction(ExceptionBiFunction<T,U,R,E> function, T param1, U param2) throws E extends java.lang.Exception
T
- the first parameter typeU
- the second parameter typeR
- the return value typeE
- the exception typefunction
- the task to run (must not be null
)param1
- the first parameter to pass to the taskparam2
- the second parameter to pass to the taskE
- if an exception occurs in the taskE extends java.lang.Exception
default <T,R> R runFunction(java.util.function.Function<T,R> function, T param)
T
- the parameter typeR
- the return value typefunction
- the task to run (must not be null
)param
- the parameter to pass to the taskdefault <T,R,E extends java.lang.Exception> R runExFunction(ExceptionFunction<T,R,E> function, T param) throws E extends java.lang.Exception
T
- the parameter typeR
- the return value typeE
- the exception typefunction
- the task to run (must not be null
)param
- the parameter to pass to the taskE
- if an exception occurs in the taskE extends java.lang.Exception
default <T,U> boolean runBiPredicate(java.util.function.BiPredicate<T,U> predicate, T param1, U param2)
T
- the first parameter typeU
- the second parameter typepredicate
- the task to run (must not be null
)param1
- the first parameter to pass to the taskparam2
- the second parameter to pass to the taskdefault <T,U,E extends java.lang.Exception> boolean runExBiPredicate(ExceptionBiPredicate<T,U,E> predicate, T param1, U param2) throws E extends java.lang.Exception
T
- the first parameter typeU
- the second parameter typeE
- the exception typepredicate
- the task to run (must not be null
)param1
- the first parameter to pass to the taskparam2
- the second parameter to pass to the taskE
- if an exception occurs in the taskE extends java.lang.Exception
default <T> boolean runPredicate(java.util.function.Predicate<T> predicate, T param)
T
- the first parameter typepredicate
- the task to run (must not be null
)param
- the parameter to pass to the taskdefault <T,E extends java.lang.Exception> boolean runExPredicate(ExceptionPredicate<T,E> predicate, T param) throws E extends java.lang.Exception
T
- the first parameter typeE
- the exception typepredicate
- the task to run (must not be null
)param
- the parameter to pass to the taskE
- if an exception occurs in the taskE extends java.lang.Exception
default <T> T runIntFunction(java.util.function.IntFunction<T> function, int value)
T
- the return value typefunction
- the task to run (must not be null
)value
- the parameter to pass to the taskdefault <T,E extends java.lang.Exception> T runExIntFunction(ExceptionIntFunction<T,E> function, int value) throws E extends java.lang.Exception
T
- the return value typeE
- the exception typefunction
- the task to run (must not be null
)value
- the parameter to pass to the taskE
- if an exception occurs in the taskE extends java.lang.Exception
default <T> T runLongFunction(java.util.function.LongFunction<T> function, long value)
T
- the return value typefunction
- the task to run (must not be null
)value
- the parameter to pass to the taskdefault <T,E extends java.lang.Exception> T runExLongFunction(ExceptionLongFunction<T,E> function, long value) throws E extends java.lang.Exception
T
- the return value typeE
- the exception typefunction
- the task to run (must not be null
)value
- the parameter to pass to the taskE
- if an exception occurs in the taskE extends java.lang.Exception
Copyright © 2015 JBoss, a division of Red Hat, Inc.