class TimeoutInvocation<T> extends java.lang.Object implements InvocationInterceptor.Invocation<T>
Modifier and Type | Class and Description |
---|---|
(package private) static class |
TimeoutInvocation.InterruptTask |
Modifier and Type | Field and Description |
---|---|
private InvocationInterceptor.Invocation<T> |
delegate |
private java.util.function.Supplier<java.lang.String> |
descriptionSupplier |
private java.util.concurrent.ScheduledExecutorService |
executor |
private TimeoutDuration |
timeout |
Constructor and Description |
---|
TimeoutInvocation(InvocationInterceptor.Invocation<T> delegate,
TimeoutDuration timeout,
java.util.concurrent.ScheduledExecutorService executor,
java.util.function.Supplier<java.lang.String> descriptionSupplier) |
Modifier and Type | Method and Description |
---|---|
private java.util.concurrent.TimeoutException |
createTimeoutException(java.lang.Throwable failure) |
T |
proceed()
Proceed with this invocation.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
skip
private final InvocationInterceptor.Invocation<T> delegate
private final TimeoutDuration timeout
private final java.util.concurrent.ScheduledExecutorService executor
private final java.util.function.Supplier<java.lang.String> descriptionSupplier
TimeoutInvocation(InvocationInterceptor.Invocation<T> delegate, TimeoutDuration timeout, java.util.concurrent.ScheduledExecutorService executor, java.util.function.Supplier<java.lang.String> descriptionSupplier)
public T proceed() throws java.lang.Throwable
InvocationInterceptor.Invocation
proceed
in interface InvocationInterceptor.Invocation<T>
null
.java.lang.Throwable
- in case the invocation failedprivate java.util.concurrent.TimeoutException createTimeoutException(java.lang.Throwable failure)