Package com.github.scribejava.core.oauth
Class OAuthService
- java.lang.Object
-
- com.github.scribejava.core.oauth.OAuthService
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
OAuth10aService,OAuth20Service
public abstract class OAuthService extends Object implements Closeable
-
-
Constructor Summary
Constructors Constructor Description OAuthService(String apiKey, String apiSecret, String callback, String userAgent, HttpClientConfig httpClientConfig, HttpClient httpClient)OAuthService(String apiKey, String apiSecret, String callback, String scope, String userAgent, HttpClientConfig httpClientConfig, HttpClient httpClient)Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()Responseexecute(OAuthRequest request)Future<Response>execute(OAuthRequest request, OAuthAsyncRequestCallback<Response> callback)<R> Future<R>execute(OAuthRequest request, OAuthAsyncRequestCallback<R> callback, OAuthRequest.ResponseConverter<R> converter)Future<Response>executeAsync(OAuthRequest request)StringgetApiKey()StringgetApiSecret()StringgetCallback()abstract StringgetVersion()Returns the OAuth version of the service.
-
-
-
Constructor Detail
-
OAuthService
@Deprecated public OAuthService(String apiKey, String apiSecret, String callback, String scope, String userAgent, HttpClientConfig httpClientConfig, HttpClient httpClient)
Deprecated.- Parameters:
apiKey- apiKeyapiSecret- apiSecretcallback- callbackscope- scopeuserAgent- userAgenthttpClientConfig- httpClientConfighttpClient- httpClient
-
OAuthService
public OAuthService(String apiKey, String apiSecret, String callback, String userAgent, HttpClientConfig httpClientConfig, HttpClient httpClient)
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getApiKey
public String getApiKey()
-
getApiSecret
public String getApiSecret()
-
getCallback
public String getCallback()
-
getVersion
public abstract String getVersion()
Returns the OAuth version of the service.- Returns:
- OAuth version as string
-
executeAsync
public Future<Response> executeAsync(OAuthRequest request)
-
execute
public Future<Response> execute(OAuthRequest request, OAuthAsyncRequestCallback<Response> callback)
-
execute
public <R> Future<R> execute(OAuthRequest request, OAuthAsyncRequestCallback<R> callback, OAuthRequest.ResponseConverter<R> converter)
-
execute
public Response execute(OAuthRequest request) throws InterruptedException, ExecutionException, IOException
-
-