CommissioningWindow.Builder

public static final class CommissioningWindow.Builder extends Object

Builder class to generate CommissioningWindow instances.

Public Constructor Summary

Public Method Summary

CommissioningWindow
build()
Builds a new instance of CommissioningWindow
CommissioningWindow.Builder
setDiscriminator(Discriminator discriminator)
Sets the Discriminator of the device opened for commissioning.
CommissioningWindow.Builder
setDurationSeconds(long durationSeconds)
Sets the duration of the commissioning window.
CommissioningWindow.Builder
setPasscode(long passcode)
Sets the passcode of the device opened for commissioning.
CommissioningWindow.Builder
setWindowOpenMillis(long windowOpenMillis)
Sets the timestamp (in milliseconds) of when the commissioning window was opened.

Inherited Method Summary

Public Constructors

public Builder ()

Public Methods

public CommissioningWindow build ()

Builds a new instance of CommissioningWindow

Throws
IllegalStateException if the device discriminator, passcode, window opened timestamp, or duration are not set.

public CommissioningWindow.Builder setDiscriminator (Discriminator discriminator)

Sets the Discriminator of the device opened for commissioning.

public CommissioningWindow.Builder setDurationSeconds (long durationSeconds)

Sets the duration of the commissioning window.

public CommissioningWindow.Builder setPasscode (long passcode)

Sets the passcode of the device opened for commissioning.

Throws
IllegalArgumentException if the given passcode is not in the range of 0-99999998, or is one of the specification-defined insecure passwords (1-8, 8-1, all same digits like 11111111)

public CommissioningWindow.Builder setWindowOpenMillis (long windowOpenMillis)

Sets the timestamp (in milliseconds) of when the commissioning window was opened. The time basis for this value must be SystemClock.elapsedRealtime() rather than System.currentTimeMillis().