Class FunctionalCallback
java.lang.Object
net.dv8tion.jda.internal.requests.FunctionalCallback
- All Implemented Interfaces:
okhttp3.Callback
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionFunctionalCallback
(BiConsumer<okhttp3.Call, IOException> failure, IOBiConsumer<okhttp3.Call, okhttp3.Response> success) -
Method Summary
Modifier and TypeMethodDescriptionstatic FunctionalCallback.Builder
onFailure
(BiConsumer<okhttp3.Call, IOException> callback) void
onFailure
(okhttp3.Call call, IOException e) void
onResponse
(okhttp3.Call call, okhttp3.Response response) static FunctionalCallback.Builder
onSuccess
(IOBiConsumer<okhttp3.Call, okhttp3.Response> callback)
-
Constructor Details
-
FunctionalCallback
public FunctionalCallback(BiConsumer<okhttp3.Call, IOException> failure, IOBiConsumer<okhttp3.Call, okhttp3.Response> success)
-
-
Method Details
-
onSuccess
public static FunctionalCallback.Builder onSuccess(IOBiConsumer<okhttp3.Call, okhttp3.Response> callback) -
onFailure
-
onFailure
- Specified by:
onFailure
in interfaceokhttp3.Callback
-
onResponse
public void onResponse(@Nonnull okhttp3.Call call, @Nonnull okhttp3.Response response) throws IOException - Specified by:
onResponse
in interfaceokhttp3.Callback
- Throws:
IOException
-