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 TypeMethodDescriptionvoid
close()
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 String
Returns the OAuth version of the service.protected boolean
isDebug()
void
No need to wrap usages inisDebug()
.void
Wrap 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:
close
in interfaceAutoCloseable
- Specified by:
close
in 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()
-