CommissioningRequestMetadata.Builder

public static final class CommissioningRequestMetadata.Builder extends Object

Builder class to generate CommissioningRequestMetadata instances.

Public Constructor Summary

Public Method Summary

CommissioningRequestMetadata
build()
Builds a new instance of CommissioningRequestMetadata.
DeviceDescriptor
getDeviceDescriptor()
Returns the device descriptor set on this builder.
NetworkLocation
getNetworkLocation()
Returns the network location set on this builder.
long
getPasscode()
Returns the passcode set on this builder.
CommissioningRequestMetadata.Builder
setDeviceDescriptor(DeviceDescriptor deviceDescriptor)
Sets the device descriptor with information about the device being commissioned.
CommissioningRequestMetadata.Builder
setNetworkLocation(NetworkLocation networkLocation)
Sets the location on the current network at which the commissionable device can be located.
CommissioningRequestMetadata.Builder
setPasscode(long passcode)
Sets the passcode which can be used to establish a connection to the commissionable device.

Inherited Method Summary

Public Constructors

public Builder ()

Public Methods

public CommissioningRequestMetadata build ()

Builds a new instance of CommissioningRequestMetadata.

Throws
IllegalStateException if the network location, passcode, or device descriptor were not set

public DeviceDescriptor getDeviceDescriptor ()

Returns the device descriptor set on this builder.

public NetworkLocation getNetworkLocation ()

Returns the network location set on this builder.

public long getPasscode ()

Returns the passcode set on this builder.

public CommissioningRequestMetadata.Builder setDeviceDescriptor (DeviceDescriptor deviceDescriptor)

Sets the device descriptor with information about the device being commissioned.

Returns
  • this builder

public CommissioningRequestMetadata.Builder setNetworkLocation (NetworkLocation networkLocation)

Sets the location on the current network at which the commissionable device can be located.

Returns
  • this builder

public CommissioningRequestMetadata.Builder setPasscode (long passcode)

Sets the passcode which can be used to establish a connection to the commissionable device.

Returns
  • this builder
Throws
IllegalArgumentException if the passcode is out of the valid range (0x1 - 0x5F5E0FE, inclusive)