Class Request<T>

java.lang.Object
net.dv8tion.jda.api.requests.Request<T>

public class Request<T> extends Object
  • Constructor Details

    • Request

      public Request(net.dv8tion.jda.internal.requests.RestActionImpl<T> restAction, Consumer<? super T> onSuccess, Consumer<? super Throwable> onFailure, BooleanSupplier checks, boolean shouldQueue, RequestBody body, Object rawBody, long deadline, boolean priority, net.dv8tion.jda.internal.requests.Route.CompiledRoute route, org.apache.commons.collections4.map.CaseInsensitiveMap<String,String> headers)
  • Method Details

    • onSuccess

      public void onSuccess(T successObj)
    • onFailure

      public void onFailure(Response response)
    • onFailure

      public void onFailure(Throwable failException)
    • onCancelled

      public void onCancelled()
    • onTimeout

      public void onTimeout()
    • getJDA

      @Nonnull public net.dv8tion.jda.internal.JDAImpl getJDA()
    • getRestAction

      @Nonnull public RestAction<T> getRestAction()
    • getOnSuccess

      @Nonnull public Consumer<? super T> getOnSuccess()
    • getOnFailure

      @Nonnull public Consumer<? super Throwable> getOnFailure()
    • isPriority

      public boolean isPriority()
    • isSkipped

      public boolean isSkipped()
    • getHeaders

      @Nullable public org.apache.commons.collections4.map.CaseInsensitiveMap<String,String> getHeaders()
    • getRoute

      @Nonnull public net.dv8tion.jda.internal.requests.Route.CompiledRoute getRoute()
    • getBody

      @Nullable public RequestBody getBody()
    • getRawBody

      @Nullable public Object getRawBody()
    • shouldQueue

      public boolean shouldQueue()
    • cancel

      public void cancel()
    • isCancelled

      public boolean isCancelled()
    • handleResponse

      public void handleResponse(@Nonnull Response response)