@PermitAll @RunAs(value="USER") public class UserRoleCaller extends Object implements RoleCaller
RoleCaller.ThrowingRunnable<E extends Throwable>, RoleCaller.ThrowingSupplier<V,E extends Throwable>| Constructor and Description |
|---|
UserRoleCaller() |
| Modifier and Type | Method and Description |
|---|---|
<V> V |
call(Supplier<V> supplier)
Calls a function that returns a value.
|
void |
run(Runnable runnable)
Calls an runnable that returns no value.
|
<V,E extends Throwable> |
throwingCall(RoleCaller.ThrowingSupplier<V,E> supplier)
Calls a function that returns a value and may throw an exception.
|
<E extends Throwable> |
throwingRun(RoleCaller.ThrowingRunnable<E> runnable)
Calls an runnable that returns no value and may throw an exception.
|
public <V> V call(Supplier<V> supplier)
RoleCallercall in interface RoleCallerV - the type of the returned value.supplier - the function to be called.supplier.public void run(Runnable runnable)
RoleCallerrun in interface RoleCallerrunnable - the runnable to be called.public <V,E extends Throwable> V throwingCall(RoleCaller.ThrowingSupplier<V,E> supplier) throws E extends Throwable
RoleCallerthrowingCall in interface RoleCallerV - the type of the returned value.E - the type of the throwable exception.supplier - the function to be called.supplier.E - if the supplier throws an exception.E extends Throwablepublic <E extends Throwable> void throwingRun(RoleCaller.ThrowingRunnable<E> runnable) throws E extends Throwable
RoleCallerthrowingRun in interface RoleCallerE - the type of the throwable exception.runnable - the runnable to be called.E - if the runnable throws an exception.E extends ThrowableCopyright © 2016. All rights reserved.