CommissioningService.Builder

class CommissioningService.Builder


A builder to create an implementation of CommissioningService.

Summary

Public constructors

Builder(context: Context!)

Creates a new builder.

Public functions

CommissioningService!

Constructs a new instance of CommissioningService as specified in this builder.

CommissioningService.Builder!

Sets a callback to be notified when commissioning is ready.

CommissioningService.Builder!

Optionally sets an executor on which callback methods will be executed.

Public constructors

Builder

Builder(context: Context!)

Creates a new builder.

Parameters
context: Context!

the context of the android.app.Service to which this will be attached

Public functions

build

fun build(): CommissioningService!

Constructs a new instance of CommissioningService as specified in this builder.

Throws
java.lang.IllegalStateException

if no callback was specified via setCallback

setCallback

@CanIgnoreReturnValue
fun setCallback(callback: CommissioningService.Callback!): CommissioningService.Builder!

Sets a callback to be notified when commissioning is ready.

Parameters
callback: CommissioningService.Callback!

a callback to be notified when a device is ready for commissioning

Returns
CommissioningService.Builder!

this builder

setExecutor

@CanIgnoreReturnValue
fun setExecutor(executor: Executor?): CommissioningService.Builder!

Optionally sets an executor on which callback methods will be executed. If not specified, an executor will be created on your behalf.

Returns
CommissioningService.Builder!

this builder