public final class NsdServiceInfo extends Object implements Parcelable
NsdManager
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<NsdServiceInfo> |
CREATOR
Implement the Parcelable interface
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
NsdServiceInfo() |
NsdServiceInfo(String sn,
String rt,
DnsSdTxtRecord tr) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Implement the Parcelable interface
|
InetAddress |
getHost()
Get the host address.
|
int |
getPort()
Get port number.
|
String |
getServiceName()
Get the service name
|
String |
getServiceType()
Get the service type
|
DnsSdTxtRecord |
getTxtRecord() |
void |
setHost(InetAddress s)
Set the host address
|
void |
setPort(int p)
Set port number
|
void |
setServiceName(String s)
Set the service name
|
void |
setServiceType(String s)
Set the service type
|
void |
setTxtRecord(DnsSdTxtRecord t) |
String |
toString()
Returns a string containing a concise, human-readable description of this
object.
|
void |
writeToParcel(Parcel dest,
int flags)
Implement the Parcelable interface
|
public static final Parcelable.Creator<NsdServiceInfo> CREATOR
public NsdServiceInfo()
public NsdServiceInfo(String sn, String rt, DnsSdTxtRecord tr)
public String getServiceName()
public void setServiceName(String s)
public String getServiceType()
public void setServiceType(String s)
public DnsSdTxtRecord getTxtRecord()
public void setTxtRecord(DnsSdTxtRecord t)
public InetAddress getHost()
public void setHost(InetAddress s)
public int getPort()
public void setPort(int p)
public String toString()
Object
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString
method
if you intend implementing your own toString
method.
public int describeContents()
describeContents
in interface Parcelable
public void writeToParcel(Parcel dest, int flags)
writeToParcel
in interface Parcelable
dest
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.