public class ServiceBuilderAsync extends Object
Constructor and Description |
---|
ServiceBuilderAsync() |
Modifier and Type | Method and Description |
---|---|
T |
apiKey(String apiKey)
Configures the api key
|
T |
apiSecret(String apiSecret)
Configures the api secret
|
ServiceBuilderAsync |
asyncHttpClientConfig(com.ning.http.client.AsyncHttpClientConfig asyncHttpClientConfig) |
ServiceBuilderAsync |
asyncHttpProviderClassName(String asyncHttpProviderClassName) |
OAuthService |
build() |
T |
callback(String callback)
Adds an OAuth callback url
|
void |
checkPreconditions() |
T |
debug() |
T |
debugStream(OutputStream stream) |
Api |
getApi() |
String |
getApiKey() |
String |
getApiSecret() |
String |
getCallback() |
OutputStream |
getDebugStream() |
String |
getGrantType() |
String |
getScope() |
SignatureType |
getSignatureType() |
String |
getState() |
T |
grantType(String grantType) |
T |
provider(Api api)
Configures the
Api Overloaded version. |
T |
provider(Class<? extends Api> apiClass)
Configures the
Api |
T |
scope(String scope)
Configures the OAuth scope.
|
T |
signatureType(SignatureType type)
Configures the signature type, choose between header, querystring, etc.
|
T |
state(String state)
Configures the anti forgery session state.
|
public ServiceBuilderAsync asyncHttpClientConfig(com.ning.http.client.AsyncHttpClientConfig asyncHttpClientConfig)
public void checkPreconditions()
public OAuthService build()
public ServiceBuilderAsync asyncHttpProviderClassName(String asyncHttpProviderClassName)
public T provider(Class<? extends Api> apiClass)
Api
apiClass
- the class of one of the existent Api
s on org.scribe.api packageServiceBuilder
instance for method chainingpublic T provider(Api api)
Api
Overloaded version. Let's you use an instance instead of a class.api
- instance of Api
sServiceBuilder
instance for method chainingpublic T callback(String callback)
callback
- callback url. Must be a valid url or 'oob' for out of band OAuthServiceBuilder
instance for method chainingpublic T apiKey(String apiKey)
apiKey
- The api key for your applicationServiceBuilder
instance for method chainingpublic T apiSecret(String apiSecret)
apiSecret
- The api secret for your applicationServiceBuilder
instance for method chainingpublic T scope(String scope)
scope
- The OAuth scopeServiceBuilder
instance for method chainingpublic T state(String state)
state
- The OAuth stateServiceBuilder
instance for method chainingpublic T signatureType(SignatureType type)
type
- SignatureTypeServiceBuilder
instance for method chainingpublic T debugStream(OutputStream stream)
public T grantType(String grantType)
public T debug()
public Api getApi()
public String getCallback()
public String getApiKey()
public String getApiSecret()
public String getScope()
public String getState()
public SignatureType getSignatureType()
public OutputStream getDebugStream()
public String getGrantType()
Copyright © 2015. All rights reserved.