MCPcopy Create free account
hub / github.com/traneio/future / onSuccess

Method onSuccess

future-java/src/main/java/io/trane/future/Promise.java:650–661  ·  view source on GitHub ↗
(final Consumer<? super T> c)

Source from the content-addressed store, hash-verified

648 }
649
650 @Override
651 public final Future<T> onSuccess(final Consumer<? super T> c) {
652 if (getInterruptHandler() != null)
653 return continuation(new OnSuccess<T>(c) {
654 @Override
655 protected final InterruptHandler getInterruptHandler() {
656 return Promise.this;
657 }
658 });
659 else
660 return continuation(new OnSuccess<T>(c));
661 }
662
663 private static class OnFailure<T> extends Continuation<T, T> {
664 private final Consumer<Throwable> c;

Callers

nothing calls this directly

Calls 2

getInterruptHandlerMethod · 0.95
continuationMethod · 0.95

Tested by

no test coverage detected