public class ServiceBuilder extends Object
OAuthService| Constructor and Description |
|---|
ServiceBuilder() |
| Modifier and Type | Method and Description |
|---|---|
T |
apiKey(String apiKey)
Configures the api key
|
T |
apiSecret(String apiSecret)
Configures the api secret
|
OAuthService |
build()
Returns the fully configured
OAuthService |
T |
callback(String callback)
Adds an OAuth callback url
|
void |
checkPreconditions() |
ServiceBuilder |
connectTimeout(Integer connectTimeout) |
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 |
ServiceBuilder |
readTimeout(Integer readTimeout) |
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 ServiceBuilder connectTimeout(Integer connectTimeout)
public ServiceBuilder readTimeout(Integer readTimeout)
public OAuthService build()
OAuthServiceOAuthServicepublic T provider(Class<? extends Api> apiClass)
ApiapiClass - the class of one of the existent Apis 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 ApisServiceBuilder 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 void checkPreconditions()
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.