public static class AWSAppSyncClient.Builder
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
<T> AWSAppSyncClient.Builder |
addCustomTypeAdapter(ScalarType scalarType,
<any> customTypeAdapter) |
AWSAppSyncClient.Builder |
apiKey(APIKeyAuthProvider apiKey) |
AWSAppSyncClient.Builder |
awsConfiguration(AWSConfiguration awsConfiguration)
Read the AppSync section of the awsconfiguration.json file and populate the serverUrl and region
variables from the ApiUrl and Region keys.
|
AWSAppSyncClient |
build()
Extract the parameters from the AWSAppSyncClient.Builder object and create
the AWSAppSyncClient object.
|
AWSAppSyncClient.Builder |
clientDatabasePrefix(java.lang.String clientDatabasePrefix)
Specify a name that uniquely identifies the AWSAppSyncClient object.
|
AWSAppSyncClient.Builder |
cognitoUserPoolsAuthProvider(CognitoUserPoolsAuthProvider cognitoUserPoolsAuthProvider) |
AWSAppSyncClient.Builder |
conflictResolver(ConflictResolverInterface conflictResolver) |
AWSAppSyncClient.Builder |
context(android.content.Context context) |
AWSAppSyncClient.Builder |
credentialsProvider(AWSCredentialsProvider credentialsProvider) |
AWSAppSyncClient.Builder |
defaultCacheHeaders(CacheHeaders cacheHeaders) |
AWSAppSyncClient.Builder |
defaultResponseFetcher(ResponseFetcher defaultResponseFetcher) |
AWSAppSyncClient.Builder |
dispatcher(java.util.concurrent.Executor dispatcher) |
AWSAppSyncClient.Builder |
mutationQueueExecutionTimeout(long mutationQueueExecutionTimeout)
Specify the maximum duration for which a mutation will be allowed to execute before it is evicted from the Mutation queue.
|
AWSAppSyncClient.Builder |
normalizedCache(NormalizedCacheFactory normalizedCacheFactory) |
AWSAppSyncClient.Builder |
oidcAuthProvider(OidcAuthProvider oidcAuthProvider) |
AWSAppSyncClient.Builder |
okHttpClient(OkHttpClient okHttpClient) |
AWSAppSyncClient.Builder |
persistentMutationsCallback(PersistentMutationsCallback persistentMutationsCallback) |
AWSAppSyncClient.Builder |
region(Regions region) |
AWSAppSyncClient.Builder |
resolver(CacheKeyResolver resolver) |
AWSAppSyncClient.Builder |
s3ObjectManager(S3ObjectManager s3ObjectManager) |
AWSAppSyncClient.Builder |
serverUrl(java.lang.String serverUrl) |
AWSAppSyncClient.Builder |
subscriptionsAutoReconnect(boolean subscriptionsAutoReconnect)
Specify automatic reconnection for Subscriptions in case of errors.
|
AWSAppSyncClient.Builder |
useClientDatabasePrefix(boolean useClientDatabasePrefix)
Flag if true will use the ClientDatabasePrefix passed in through the
awsconfiguration.json or from the #clientDatabasePrefix builder.
|
public AWSAppSyncClient.Builder region(Regions region)
public AWSAppSyncClient.Builder credentialsProvider(AWSCredentialsProvider credentialsProvider)
public AWSAppSyncClient.Builder apiKey(APIKeyAuthProvider apiKey)
public AWSAppSyncClient.Builder cognitoUserPoolsAuthProvider(CognitoUserPoolsAuthProvider cognitoUserPoolsAuthProvider)
public AWSAppSyncClient.Builder oidcAuthProvider(OidcAuthProvider oidcAuthProvider)
public AWSAppSyncClient.Builder serverUrl(java.lang.String serverUrl)
public AWSAppSyncClient.Builder context(android.content.Context context)
public AWSAppSyncClient.Builder s3ObjectManager(S3ObjectManager s3ObjectManager)
public AWSAppSyncClient.Builder normalizedCache(NormalizedCacheFactory normalizedCacheFactory)
public AWSAppSyncClient.Builder resolver(CacheKeyResolver resolver)
public AWSAppSyncClient.Builder conflictResolver(ConflictResolverInterface conflictResolver)
public <T> AWSAppSyncClient.Builder addCustomTypeAdapter(ScalarType scalarType, <any> customTypeAdapter)
public AWSAppSyncClient.Builder dispatcher(java.util.concurrent.Executor dispatcher)
public AWSAppSyncClient.Builder defaultCacheHeaders(CacheHeaders cacheHeaders)
public AWSAppSyncClient.Builder okHttpClient(OkHttpClient okHttpClient)
public AWSAppSyncClient.Builder defaultResponseFetcher(ResponseFetcher defaultResponseFetcher)
public AWSAppSyncClient.Builder persistentMutationsCallback(PersistentMutationsCallback persistentMutationsCallback)
public AWSAppSyncClient.Builder awsConfiguration(AWSConfiguration awsConfiguration)
"AppSync": {
"Default": {
"ApiUrl": "https://xxxx.appsync-api.
Usage: .awsConfiguration(new AWSConfiguration(getApplicationContext())
awsConfiguration - The object representing the configuration
information from awsconfiguration.jsonpublic AWSAppSyncClient.Builder subscriptionsAutoReconnect(boolean subscriptionsAutoReconnect)
subscriptionsAutoReconnect - true to to enable and false to disable automatic reconnection of subscriptions.public AWSAppSyncClient.Builder mutationQueueExecutionTimeout(long mutationQueueExecutionTimeout)
mutationQueueExecutionTimeout - the max execution time allowed.public AWSAppSyncClient.Builder useClientDatabasePrefix(boolean useClientDatabasePrefix)
useClientDatabasePrefix - use a prefix for the client databases.public AWSAppSyncClient.Builder clientDatabasePrefix(java.lang.String clientDatabasePrefix)
clientDatabasePrefix - prefix used for the database names.public AWSAppSyncClient build()