Class OAuthService

java.lang.Object
com.github.scribejava.core.oauth.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 Details

    • OAuthService

      public OAuthService​(java.lang.String apiKey, java.lang.String apiSecret, java.lang.String callback, java.io.OutputStream debugStream, java.lang.String userAgent, HttpClientConfig httpClientConfig, HttpClient httpClient)
  • Method Details

    • 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()
    • 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 java.util.concurrent.Future<Response> execute​(OAuthRequest request, OAuthAsyncRequestCallback<Response> callback)
    • execute

      public <R> java.util.concurrent.Future<R> execute​(OAuthRequest request, OAuthAsyncRequestCallback<R> callback, OAuthRequest.ResponseConverter<R> converter)
    • 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
    • log

      public void log​(java.lang.String message)
      No need to wrap usages in isDebug().
      Parameters:
      message - message to log
    • log

      public void log​(java.lang.String messagePattern, java.lang.Object... params)
      Wrap usages in isDebug(). It was made for optimization - to not calculate "params" in production mode.
      Parameters:
      messagePattern - messagePattern
      params - params
    • isDebug

      protected boolean isDebug()