Package com.tapkey.mobile
Class TapkeyServiceFactoryBuilder
- java.lang.Object
-
- com.tapkey.mobile.TapkeyServiceFactoryBuilder
-
public class TapkeyServiceFactoryBuilder extends Object
This class is used to build aTapkeyServiceFactory
.The example below illustrates a default use of this class and will cover most use cases:
TapkeyServiceFactoryBuilder b = new TapkeyServiceFactoryBuilder(); TapkeyServiceFactory tapkeyServiceFactory = b.build(this);
- See Also:
TapkeyServiceFactory
-
-
Constructor Summary
Constructors Constructor Description TapkeyServiceFactoryBuilder(android.app.Application application)
Constructs a Tapkey service factory builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TapkeyServiceFactoryBuilder
addDataContextMigrationListener(net.tpky.mc.dao.DataContextMigrationListener dataContextMigrationListener)
Reserved for internal use.TapkeyServiceFactory
build()
Builds the service factory.TapkeyServiceFactoryBuilder
setBluetoothAdvertisingFormat(TapkeyBleAdvertisingFormat tapkeyAdvertisingFormat)
TapkeyServiceFactoryBuilder
setBluetoothStack(net.tpky.mc.ble.BluetoothStack bluetoothStack)
Reserved for internal use.TapkeyServiceFactoryBuilder
setConfig(TapkeyEnvironmentConfig config)
Overrides the default Tapkey environment configuration with the specified one.TapkeyServiceFactoryBuilder
setDiagnosticsHandler(net.tpky.mc.diagnostics.DiagnosticsHandler diagnosticsHandler)
Reserved for internal use.TapkeyServiceFactoryBuilder
setHttpRequestExecutor(net.tpky.mc.rest.AsyncHttpRequestExecutor httpRequestExecutor)
Reserved for internal use.TapkeyServiceFactoryBuilder
setPushNotificationTokenProvider(PushNotificationTokenProvider pushNotificationTokenProvider)
Sets the application's push notification provider.TapkeyServiceFactoryBuilder
setServerClock(net.tpky.mc.time.ServerClock serverClock)
Overrides the internal server clock used by various components of the SDK.TapkeyServiceFactoryBuilder
setSystemClock(net.tpky.mc.time.Clock systemClock)
Overrides the system clock.TapkeyServiceFactoryBuilder
setTokenRefreshHandler(TokenRefreshHandler tokenRefreshHandler)
Sets the application's token refresh handler.TapkeyServiceFactoryBuilder
setWebSocketFactory(net.tpky.mc.relay.WebSocketFactory webSocketFactory)
Reserved for internal use.
-
-
-
Method Detail
-
setConfig
public TapkeyServiceFactoryBuilder setConfig(TapkeyEnvironmentConfig config)
Overrides the default Tapkey environment configuration with the specified one. Must only be used if suggested by Tapkey.- Parameters:
config
- the custom Tapkey environment configuration.- Returns:
- the TapkeyServiceFactoryBuilder instance for chaining.
-
setBluetoothAdvertisingFormat
public TapkeyServiceFactoryBuilder setBluetoothAdvertisingFormat(TapkeyBleAdvertisingFormat tapkeyAdvertisingFormat)
-
setHttpRequestExecutor
public TapkeyServiceFactoryBuilder setHttpRequestExecutor(net.tpky.mc.rest.AsyncHttpRequestExecutor httpRequestExecutor)
Reserved for internal use.
-
setWebSocketFactory
public TapkeyServiceFactoryBuilder setWebSocketFactory(net.tpky.mc.relay.WebSocketFactory webSocketFactory)
Reserved for internal use.
-
setDiagnosticsHandler
public TapkeyServiceFactoryBuilder setDiagnosticsHandler(net.tpky.mc.diagnostics.DiagnosticsHandler diagnosticsHandler)
Reserved for internal use.
-
setPushNotificationTokenProvider
public TapkeyServiceFactoryBuilder setPushNotificationTokenProvider(PushNotificationTokenProvider pushNotificationTokenProvider)
Sets the application's push notification provider. The SDK will call this handler to request push notification registration tokens.- Parameters:
pushNotificationTokenProvider
- the PushNotificationTokenProvider- Returns:
- the TapkeyServiceFactoryBuilder instance for chaining.
- See Also:
PushNotificationTokenProvider
-
setTokenRefreshHandler
public TapkeyServiceFactoryBuilder setTokenRefreshHandler(TokenRefreshHandler tokenRefreshHandler)
Sets the application's token refresh handler. The SDK will call this handler to request renewal of access tokens.- Parameters:
tokenRefreshHandler
- the TokenRefreshHandler- Returns:
- the TapkeyServiceFactoryBuilder instance for chaining.
- See Also:
TokenRefreshHandler
-
addDataContextMigrationListener
public TapkeyServiceFactoryBuilder addDataContextMigrationListener(net.tpky.mc.dao.DataContextMigrationListener dataContextMigrationListener)
Reserved for internal use.
-
setSystemClock
public TapkeyServiceFactoryBuilder setSystemClock(net.tpky.mc.time.Clock systemClock)
Overrides the system clock. This mainly makes sense in testing scenarios.- Parameters:
systemClock
- the system clock.- Returns:
- the TapkeyServiceFactoryBuilder instance for chaining.
-
setServerClock
public TapkeyServiceFactoryBuilder setServerClock(net.tpky.mc.time.ServerClock serverClock)
Overrides the internal server clock used by various components of the SDK. If applications require access to the server clock, they must use this method to override the SDK's internal server clock and keep hold of the reference for later use.- Parameters:
serverClock
- the ServerClock to be used by the SDK.- Returns:
- the TapkeyServiceFactoryBuilder instance for chaining.
-
setBluetoothStack
public TapkeyServiceFactoryBuilder setBluetoothStack(net.tpky.mc.ble.BluetoothStack bluetoothStack)
Reserved for internal use.
-
build
@RequiresPermission("android.permission.INTERNET") public TapkeyServiceFactory build()
Builds the service factory.- Returns:
- the TapkeyServiceFactory with the configured properties.
- See Also:
TapkeyServiceFactory
-
-