Class OAuthAsyncCompletionHandler<T>

  • All Implemented Interfaces:
    org.apache.http.concurrent.FutureCallback<org.apache.http.HttpResponse>

    public class OAuthAsyncCompletionHandler<T>
    extends java.lang.Object
    implements org.apache.http.concurrent.FutureCallback<org.apache.http.HttpResponse>
    • Constructor Summary

      Constructors 
      Constructor Description
      OAuthAsyncCompletionHandler​(com.github.scribejava.core.model.OAuthAsyncRequestCallback<T> callback, com.github.scribejava.core.model.OAuthRequest.ResponseConverter<T> converter)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cancelled()  
      void completed​(org.apache.http.HttpResponse httpResponse)  
      void failed​(java.lang.Exception e)  
      T getResult()  
      T getResult​(long timeout, java.util.concurrent.TimeUnit unit)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OAuthAsyncCompletionHandler

        public OAuthAsyncCompletionHandler​(com.github.scribejava.core.model.OAuthAsyncRequestCallback<T> callback,
                                           com.github.scribejava.core.model.OAuthRequest.ResponseConverter<T> converter)
    • Method Detail

      • completed

        public void completed​(org.apache.http.HttpResponse httpResponse)
        Specified by:
        completed in interface org.apache.http.concurrent.FutureCallback<T>
      • failed

        public void failed​(java.lang.Exception e)
        Specified by:
        failed in interface org.apache.http.concurrent.FutureCallback<T>
      • cancelled

        public void cancelled()
        Specified by:
        cancelled in interface org.apache.http.concurrent.FutureCallback<T>
      • getResult

        public T getResult()
                    throws java.lang.InterruptedException,
                           java.util.concurrent.ExecutionException
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • getResult

        public T getResult​(long timeout,
                           java.util.concurrent.TimeUnit unit)
                    throws java.lang.InterruptedException,
                           java.util.concurrent.ExecutionException,
                           java.util.concurrent.TimeoutException
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
        java.util.concurrent.TimeoutException