All Downloads are FREE. Search and download functionalities are using the official Maven repository.

zipkin2.Callback Maven / Gradle / Ivy

There is a newer version: 3.4.2
Show newest version
/*
 * Copyright The OpenZipkin Authors
 * SPDX-License-Identifier: Apache-2.0
 */
package zipkin2;

import zipkin2.internal.Nullable;

/**
 * A callback of a single result or error.
 *
 * 

This is a bridge to async libraries such as CompletableFuture complete, completeExceptionally. * *

Implementations will call either {@link #onSuccess} or {@link #onError}, but not both. */ public interface Callback { /** * Invoked when computation produces its potentially null value successfully. * *

When this is called, {@link #onError} won't be. */ void onSuccess(@Nullable V value); /** * Invoked when computation produces a possibly null value successfully. * *

When this is called, {@link #onSuccess} won't be. */ void onError(Throwable t); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy