Class PushClientBuilder
java.lang.Object
com.sap.mobile.services.client.push.PushClientBuilder
The PushClientBuilder is used to instantiate a push client from a
configuration source.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild
(MobileServicesBinding binding) Instantiate the push client from a mobile service binding source.build
(MobileServicesSettings settings) Instantiate the push client from a mobile service setting source, using the first push service key aliasbuild
(MobileServicesSettings settings, String serviceKeyAlias) Instantiate the push client from a mobile service setting source, using the given push service key aliasbuild
(String applicationId, String rootUri, CustomAuthHeaderSupplier authHeaderSupplier) Instantiate the push client with custom authorization mechanisms.withConnectTimeout
(Duration connectTimeout) Configure the client's connect timeout.withReadTimeout
(Duration readTimeout) Configure the client's read timeout.withTenantId
(String tenantId) Configure the client's tenant-id.withTenantSupplier
(TenantSupplier tenantSupplier) Configure the client's tenant resolver.
-
Constructor Details
-
PushClientBuilder
public PushClientBuilder()
-
-
Method Details
-
build
Instantiate the push client from a mobile service setting source, using the first push service key alias- Parameters:
settings
-- Returns:
-
build
Instantiate the push client from a mobile service setting source, using the given push service key alias- Parameters:
settings
-- Returns:
-
build
Instantiate the push client from a mobile service binding source.- Parameters:
binding
-- Returns:
-
build
public PushClient build(String applicationId, String rootUri, CustomAuthHeaderSupplier authHeaderSupplier) Instantiate the push client with custom authorization mechanisms. This is meant to be a fallback if any other method will not work for the use case.- Parameters:
applicationId
- ID of the mobile applicationrootUri
- Root URI of the mobile applicationauthHeaderSupplier
- Supplier for a custom authentication header
-
withConnectTimeout
Configure the client's connect timeout.- Parameters:
connectTimeout
- client connect timeout- Returns:
- new instance of client builder
-
withReadTimeout
Configure the client's read timeout.- Parameters:
readTimeout
- client read timeout- Returns:
- new instance of client builder
-
withTenantSupplier
Configure the client's tenant resolver.- Parameters:
tenantSupplier
- tenant supplier- Returns:
- new instance of client builder
-
withTenantId
Configure the client's tenant-id.- Parameters:
tenantId
- tenant-id- Returns:
- new instance of client builder
-