exchange.apexpro.connector.ResponseCallback Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apexpro-connector-java Show documentation
Show all versions of apexpro-connector-java Show documentation
A lightweight library to ApeX-Protocol
package exchange.apexpro.connector;
/**
* The interface for define asynchronous invoking callback.
If you want to ues the asynchronous
* invoking, you must implement the ResponseCallback yourself.
The onResponse method is
* mandatory, when the asynchronous invoking completed, this method will be called.
You should
* check the AsyncResult to know whether the asynchronous invoking is successful or not, and get the
* response data from AsyncResult.
*/
@FunctionalInterface
public interface ResponseCallback {
/**
* Be called when the request successful.
*
* @param response The {@link AsyncResult} of the asynchronous invoking.
*/
void onResponse(T response);
}