|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.netheos.pcsapi.storage.StorageBuilder
public class StorageBuilder
Class that facilitates the construction of a storage provider
| Method Summary | |
|---|---|
IStorageProvider |
build()
Builds a provider-specific storage implementation, by passing this builder in constructor. |
AppInfo |
getAppInfo()
|
org.apache.http.client.HttpClient |
getHttpClient()
|
RetryStrategy |
getRetryStrategy()
|
UserCredentials<?> |
getUserCredentials()
|
UserCredentialsRepository |
getUserCredentialsRepo()
|
StorageBuilder |
setAppInfoRepository(AppInfoRepository appInfoRepo,
String appName)
Set the app informations repository. |
StorageBuilder |
setForBootstrapping(boolean forBootstrapping)
OAuth bootstrap is not obvious : storage must be instantiated _without_ users credentials (for retrieving userId thanks to accessToken). |
StorageBuilder |
setHttpClient(org.apache.http.client.HttpClient httpClient)
Sets a HTTP client that extends org.apache.http.client.HttpClient. |
StorageBuilder |
setRetryStrategy(RetryStrategy retryStrategy)
Sets the retry requests strategy to be used by storage. |
StorageBuilder |
setUserCredentialsRepository(UserCredentialsRepository userCredentialsRepo,
String userId)
Set the user credentials repository. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public StorageBuilder setAppInfoRepository(AppInfoRepository appInfoRepo,
String appName)
appInfoRepo - The repository to useappName - The application name
public StorageBuilder setUserCredentialsRepository(UserCredentialsRepository userCredentialsRepo,
String userId)
userCredentialsRepo - The repositoryuserId - The user identifier (may be null if the identifier is unknown)
public StorageBuilder setForBootstrapping(boolean forBootstrapping)
forBootstrapping - true if it is the first start of the API
public IStorageProvider build()
public AppInfo getAppInfo()
public UserCredentialsRepository getUserCredentialsRepo()
public UserCredentials<?> getUserCredentials()
public org.apache.http.client.HttpClient getHttpClient()
public StorageBuilder setHttpClient(org.apache.http.client.HttpClient httpClient)
httpClient - The http client to use for issuing requests. This client settings may be modified by pcs_api,
thus it is recommended to use a dedicated client for each provider.
public RetryStrategy getRetryStrategy()
public StorageBuilder setRetryStrategy(RetryStrategy retryStrategy)
retryStrategy - The retry strategy to use
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||