Class PushClientBuilder

java.lang.Object
com.sap.mobile.services.client.push.PushClientBuilder

public final class PushClientBuilder extends Object
The PushClientBuilder is used to instantiate a push client from a configuration source.
  • Constructor Details

    • PushClientBuilder

      public PushClientBuilder()
  • Method Details

    • build

      public PushClient build(MobileServicesSettings settings)
      Instantiate the push client from a mobile service setting source, using the first push service key alias
      Parameters:
      settings -
      Returns:
    • build

      public PushClient build(MobileServicesSettings settings, String serviceKeyAlias)
      Instantiate the push client from a mobile service setting source, using the given push service key alias
      Parameters:
      settings -
      Returns:
    • build

      public PushClient build(MobileServicesBinding binding)
      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 application
      rootUri - Root URI of the mobile application
      authHeaderSupplier - Supplier for a custom authentication header
    • withConnectTimeout

      public PushClientBuilder withConnectTimeout(Duration connectTimeout)
      Configure the client's connect timeout.
      Parameters:
      connectTimeout - client connect timeout
      Returns:
      new instance of client builder
    • withReadTimeout

      public PushClientBuilder withReadTimeout(Duration readTimeout)
      Configure the client's read timeout.
      Parameters:
      readTimeout - client read timeout
      Returns:
      new instance of client builder
    • withTenantSupplier

      public PushClientBuilder withTenantSupplier(TenantSupplier tenantSupplier)
      Configure the client's tenant resolver.
      Parameters:
      tenantSupplier - tenant supplier
      Returns:
      new instance of client builder
    • withTenantId

      public PushClientBuilder withTenantId(String tenantId)
      Configure the client's tenant-id.
      Parameters:
      tenantId - tenant-id
      Returns:
      new instance of client builder