DnsSdServiceInfo

public final class DnsSdServiceInfo extends Object
implements Parcelable

Information about a resolved Matter DNS-SD service.

Nested Class Summary

class DnsSdServiceInfo.Builder Builder class to generate DnsSdServiceInfo instances. 

Inherited Constant Summary

Public Method Summary

static DnsSdServiceInfo.Builder
builder()
Returns an empty DnsSdServiceInfo.Builder instance.
boolean
String
getInstanceName()
Returns the DNS-SD instance name of this service.
List<NetworkLocation>
getNetworkLocations()
Returns all NetworkLocations for the device, sorted in descending priority.
NetworkLocation
String
getServiceType()
Returns the DNS-SD service type (e.g.
String
getTxtAttributeValue(String key)
Returns the value of the TxtRecord that matches the given key, if present; else returns null.
List<TxtRecord>
getTxtRecords()
Returns all TXT records for the device.
boolean
hasTxtAttribute(String key)
Returns true if there is a TXT record for the given key.
int
String
void
writeToParcel(Parcel dest, int flags)

Inherited Method Summary

Public Methods

public static DnsSdServiceInfo.Builder builder ()

Returns an empty DnsSdServiceInfo.Builder instance.

public boolean equals (Object o)

public String getInstanceName ()

Returns the DNS-SD instance name of this service.

public List<NetworkLocation> getNetworkLocations ()

Returns all NetworkLocations for the device, sorted in descending priority. This list will always contain at least one entry.

public NetworkLocation getPrimaryNetworkLocation ()

Returns the highest priority NetworkLocation from getNetworkLocations(). This is always equivalent to the first entry in getNetworkLocations() and is provided as a convenience.

public String getServiceType ()

Returns the DNS-SD service type (e.g. _matter._tcp).

public String getTxtAttributeValue (String key)

Returns the value of the TxtRecord that matches the given key, if present; else returns null.

Parameters
key the attribute key; case is ignored when matching

public List<TxtRecord> getTxtRecords ()

Returns all TXT records for the device.

public boolean hasTxtAttribute (String key)

Returns true if there is a TXT record for the given key.

Parameters
key the attribute key; case is ignored when matching

public int hashCode ()

public String toString ()

public void writeToParcel (Parcel dest, int flags)