Class OAuthService

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
    Direct Known Subclasses:
    OAuth10aService, OAuth20Service

    public abstract class OAuthService
    extends java.lang.Object
    implements java.io.Closeable
    • Constructor Detail

      • OAuthService

        public OAuthService​(java.lang.String apiKey,
                            java.lang.String apiSecret,
                            java.lang.String callback,
                            java.lang.String scope,
                            java.lang.String userAgent,
                            HttpClientConfig httpClientConfig,
                            HttpClient httpClient)
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • getApiKey

        public java.lang.String getApiKey()
      • getApiSecret

        public java.lang.String getApiSecret()
      • getCallback

        public java.lang.String getCallback()
      • getScope

        public java.lang.String getScope()
      • getVersion

        public abstract java.lang.String getVersion()
        Returns the OAuth version of the service.
        Returns:
        OAuth version as string
      • executeAsync

        public java.util.concurrent.Future<Response> executeAsync​(OAuthRequest request)
      • execute

        public Response execute​(OAuthRequest request)
                         throws java.lang.InterruptedException,
                                java.util.concurrent.ExecutionException,
                                java.io.IOException
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
        java.io.IOException