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

com.binance.api.client.BinanceApiCallback Maven / Gradle / Ivy

The newest version!
package com.binance.api.client;

/**
 * BinanceApiCallback is a functional interface used together with the BinanceApiAsyncClient to provide a non-blocking REST client.
 *
 * @param  the return type from the callback
 */
@FunctionalInterface
public interface BinanceApiCallback {

    /**
     * Called whenever a response comes back from the Binance API.
     *
     * @param response the expected response object
     */
    void onResponse(T response);

    /**
     * Called whenever an error occurs.
     *
     * @param cause the cause of the failure
     */
    default void onFailure(Throwable cause) {}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy