Class Request<T>


  • public class Request<T>
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Request​(net.dv8tion.jda.internal.requests.RestActionImpl<T> restAction, java.util.function.Consumer<? super T> onSuccess, java.util.function.Consumer<? super java.lang.Throwable> onFailure, java.util.function.BooleanSupplier checks, boolean shouldQueue, RequestBody body, java.lang.Object rawBody, long deadline, boolean priority, net.dv8tion.jda.internal.requests.Route.CompiledRoute route, org.apache.commons.collections4.map.CaseInsensitiveMap<java.lang.String,​java.lang.String> headers)  
    • Constructor Detail

      • Request

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

      • onSuccess

        public void onSuccess​(T successObj)
      • onFailure

        public void onFailure​(Response response)
      • onFailure

        public void onFailure​(java.lang.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 java.util.function.Consumer<? super T> getOnSuccess()
      • getOnFailure

        @Nonnull
        public java.util.function.Consumer<? super java.lang.Throwable> getOnFailure()
      • isPriority

        public boolean isPriority()
      • isSkipped

        public boolean isSkipped()
      • getHeaders

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

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

        @Nullable
        public java.lang.Object getRawBody()
      • shouldQueue

        public boolean shouldQueue()
      • cancel

        public void cancel()
      • isCancelled

        public boolean isCancelled()
      • handleResponse

        public void handleResponse​(@Nonnull
                                   Response response)