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
-
Constructor Summary
ConstructorsConstructorDescriptionOAuthService(String apiKey, String apiSecret, String callback, OutputStream debugStream, String userAgent, HttpClientConfig httpClientConfig, HttpClient httpClient) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()execute(OAuthRequest request) execute(OAuthRequest request, OAuthAsyncRequestCallback<Response> callback) <R> Future<R>execute(OAuthRequest request, OAuthAsyncRequestCallback<R> callback, OAuthRequest.ResponseConverter<R> converter) executeAsync(OAuthRequest request) abstract StringReturns the OAuth version of the service.protected booleanisDebug()voidNo need to wrap usages inisDebug().voidWrap usages inisDebug().
-
Constructor Details
-
OAuthService
public OAuthService(String apiKey, String apiSecret, String callback, OutputStream debugStream, String userAgent, HttpClientConfig httpClientConfig, HttpClient httpClient)
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getApiKey
-
getApiSecret
-
getCallback
-
getVersion
Returns the OAuth version of the service.- Returns:
- OAuth version as string
-
executeAsync
-
execute
-
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 -
log
No need to wrap usages inisDebug().- Parameters:
message- message to log
-
log
Wrap usages inisDebug(). It was made for optimization - to not calculate "params" in production mode.- Parameters:
messagePattern- messagePatternparams- params
-
isDebug
protected boolean isDebug()
-