ServiceInfoImpl
Date: 2017-02-10

javax.jmdns.impl

## Class ServiceInfoImpl

- java.lang.Object
- - javax.jmdns.ServiceInfo
  - - javax.jmdns.impl.ServiceInfoImpl

- All Implemented Interfaces:
    java.lang.Cloneable, DNSStatefulObject

      public class ServiceInfoImpl
      extends ServiceInfo
      implements DNSStatefulObject

  JmDNS service information.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `ServiceInfoImpl.Delegate`

    - ### Nested classes/interfaces inherited from class javax.jmdns.ServiceInfo

      `ServiceInfo.Fields`

    - ### Nested classes/interfaces inherited from interface javax.jmdns.impl.DNSStatefulObject

      `DNSStatefulObject.DefaultImplementation, DNSStatefulObject.DNSStatefulObjectSemaphore`

  - ### Field Summary

    - ### Fields inherited from class javax.jmdns.ServiceInfo

      `NO_VALUE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServiceInfoImpl(java.util.Map<ServiceInfo.Fields,java.lang.String> qualifiedNameMap, int port, int weight, int priority, boolean persistent, java.util.Map<java.lang.String,?> props)`
    `ServiceInfoImpl(java.lang.String type, java.lang.String name, java.lang.String subtype, int port, int weight, int priority, boolean persistent, byte[] text)`
    `ServiceInfoImpl(java.lang.String type, java.lang.String name, java.lang.String subtype, int port, int weight, int priority, boolean persistent, java.util.Map<java.lang.String,?> props)`
    `ServiceInfoImpl(java.lang.String type, java.lang.String name, java.lang.String subtype, int port, int weight, int priority, boolean persistent, java.lang.String text)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `advanceState(DNSTask task)` Sets the state and notifies all objects that wait on the ServiceInfo.
    `java.util.Collection<DNSRecord>` | `answers(boolean unique, int ttl, HostInfo localHost)`
    `void` | `associateWithTask(DNSTask task, DNSState state)` Sets the task associated with this Object.
    `boolean` | `cancelState()` Sets the state and notifies all objects that wait on the ServiceInfo.
    `protected static java.util.Map<ServiceInfo.Fields,java.lang.String>` | `checkQualifiedNameMap(java.util.Map<ServiceInfo.Fields,java.lang.String> qualifiedNameMap)`
    `ServiceInfoImpl` | `clone()`
    `boolean` | `closeState()` Sets the state and notifies all objects that wait on the ServiceInfo.
    `static java.util.Map<ServiceInfo.Fields,java.lang.String>` | `decodeQualifiedNameMap(java.lang.String type, java.lang.String name, java.lang.String subtype)`
    `static java.util.Map<ServiceInfo.Fields,java.lang.String>` | `decodeQualifiedNameMapForType(java.lang.String type)`
    `boolean` | `equals(java.lang.Object obj)`
    `java.net.InetAddress` | `getAddress()` Deprecated.
    `java.lang.String` | `getApplication()` Returns the application of the service info suitable for printing.
    `JmDNSImpl` | `getDns()` Returns the DNS associated with this object.
    `java.lang.String` | `getDomain()` Returns the domain of the service info suitable for printing.
    `java.lang.String` | `getHostAddress()` Deprecated.
    `java.lang.String[]` | `getHostAddresses()` Returns the host IP addresses string in textual presentation.
    `java.net.Inet4Address` | `getInet4Address()` Deprecated.
    `java.net.Inet4Address[]` | `getInet4Addresses()` Returns a list of all IPv4 InetAddresses that can be used for this service.
    `java.net.Inet6Address` | `getInet6Address()` Deprecated.
    `java.net.Inet6Address[]` | `getInet6Addresses()` Returns a list of all IPv6 InetAddresses that can be used for this service.
    `java.net.InetAddress` | `getInetAddress()` Deprecated.
    `java.net.InetAddress[]` | `getInetAddresses()` Returns a list of all InetAddresses that can be used for this service.
    `java.lang.String` | `getKey()` The key is used to retrieve service info in hash tables. The key is the lower case qualified name.
    `java.lang.String` | `getName()` Unqualified service instance name, such as `foobar` .
    `java.lang.String` | `getNiceTextString()` Returns a description of the service info suitable for printing.
    `int` | `getPort()` Get the port for the service.
    `int` | `getPriority()` Get the priority of the service.
    `byte[]` | `getPropertyBytes(java.lang.String name)` Get a property of the service.
    `java.util.Enumeration<java.lang.String>` | `getPropertyNames()` Enumeration of the property names.
    `java.lang.String` | `getPropertyString(java.lang.String name)` Get a property of the service.
    `java.lang.String` | `getProtocol()` Returns the protocol of the service info suitable for printing.
    `java.lang.String` | `getQualifiedName()` Fully qualified service name, such as `foobar._http._tcp.local.` .
    `java.util.Map<ServiceInfo.Fields,java.lang.String>` | `getQualifiedNameMap()` Returns a dictionary of the fully qualified name component of this service.
    `java.lang.String` | `getServer()` Get the name of the server.
    `java.lang.String` | `getSubtype()` Returns the sub type of the service info suitable for printing.
    `byte[]` | `getTextBytes()` Get the text for the service as raw bytes.
    `java.lang.String` | `getTextString()` Deprecated.
    `java.lang.String` | `getType()` Fully qualified service type name, such as `_http._tcp.local.`
    `java.lang.String` | `getTypeWithSubtype()` Fully qualified service type name with the subtype if appropriate, such as `_printer._sub._http._tcp.local.`
    `java.lang.String` | `getURL()` Deprecated.
    `java.lang.String` | `getURL(java.lang.String protocol)` Deprecated.
    `java.lang.String[]` | `getURLs()` Get the list of URL for this service.
    `java.lang.String[]` | `getURLs(java.lang.String protocol)` Get the list of URL for this service.
    `int` | `getWeight()` Get the weight of the service.
    `boolean` | `hasData()` Returns true if the service info is filled with data.
    `int` | `hashCode()`
    `boolean` | `isAnnounced()` Returns true, if this is an announced state.
    `boolean` | `isAnnouncing()` Returns true, if this is an announcing state.
    `boolean` | `isAssociatedWithTask(DNSTask task, DNSState state)` Checks if this object is associated with the task and in the same state.
    `boolean` | `isCanceled()` Returns true, if this is a canceled state.
    `boolean` | `isCanceling()` Returns true, if this is a canceling state.
    `boolean` | `isClosed()` Returns true, if this is a closed state.
    `boolean` | `isClosing()` Returns true, if this is a closing state.
    `boolean` | `isPersistent()` Returns `true` if ServiceListener.resolveService will be called whenever new new information is received.
    `boolean` | `isProbing()` Returns true, if this is a probing state.
    `boolean` | `needTextAnnouncing()`
    `boolean` | `recoverState()` Sets the state and notifies all objects that wait on the ServiceInfo.
    `void` | `removeAssociationWithTask(DNSTask task)` Remove the association of the task with this Object.
    `boolean` | `revertState()` Sets the state and notifies all objects that wait on the ServiceInfo.
    `void` | `setDns(JmDNSImpl dns)`
    `void` | `setNeedTextAnnouncing(boolean needTextAnnouncing)`
    `void` | `setText(byte[] text)` Set the text for the service.
    `void` | `setText(java.util.Map<java.lang.String,?> props)` Set the text for the service.
    `java.lang.String` | `toString()`
    `void` | `updateRecord(DNSCache dnsCache, long now, DNSEntry rec)` JmDNS callback to update a DNS record.
    `boolean` | `waitForAnnounced(long timeout)` Waits for the object to be announced.
    `boolean` | `waitForCanceled(long timeout)` Waits for the object to be canceled.

    - ### Methods inherited from class javax.jmdns.ServiceInfo

      `create, create, create, create, create, create, create, create, create, create, create, create, create, create, create`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ServiceInfoImpl

          public ServiceInfoImpl(java.lang.String type,
                         java.lang.String name,
                         java.lang.String subtype,
                         int port,
                         int weight,
                         int priority,
                         boolean persistent,
                         java.lang.String text)

      Parameters:
        `type` -
        `name` -
        `subtype` -
        `port` -
        `weight` -
        `priority` -
        `persistent` -
        `text` -
      See Also:
        `ServiceInfo.create(String, String, int, int, int, String)`

    - #### ServiceInfoImpl

          public ServiceInfoImpl(java.lang.String type,
                         java.lang.String name,
                         java.lang.String subtype,
                         int port,
                         int weight,
                         int priority,
                         boolean persistent,
                         java.util.Map<java.lang.String,?> props)

      Parameters:
        `type` -
        `name` -
        `subtype` -
        `port` -
        `weight` -
        `priority` -
        `persistent` -
        `props` -
      See Also:
        `ServiceInfo.create(String, String, int, int, int, Map)`

    - #### ServiceInfoImpl

          public ServiceInfoImpl(java.lang.String type,
                         java.lang.String name,
                         java.lang.String subtype,
                         int port,
                         int weight,
                         int priority,
                         boolean persistent,
                         byte[] text)

      Parameters:
        `type` -
        `name` -
        `subtype` -
        `port` -
        `weight` -
        `priority` -
        `persistent` -
        `text` -
      See Also:
        `ServiceInfo.create(String, String, int, int, int, byte[])`

    - #### ServiceInfoImpl

          public ServiceInfoImpl(java.util.Map<ServiceInfo.Fields,java.lang.String> qualifiedNameMap,
                         int port,
                         int weight,
                         int priority,
                         boolean persistent,
                         java.util.Map<java.lang.String,?> props)

  - ### Method Detail

    - #### decodeQualifiedNameMap

          public static java.util.Map<ServiceInfo.Fields,java.lang.String> decodeQualifiedNameMap(java.lang.String type,
                                                                                  java.lang.String name,
                                                                                  java.lang.String subtype)

    - #### decodeQualifiedNameMapForType

          public static java.util.Map<ServiceInfo.Fields,java.lang.String> decodeQualifiedNameMapForType(java.lang.String type)

    - #### checkQualifiedNameMap

          protected static java.util.Map<ServiceInfo.Fields,java.lang.String> checkQualifiedNameMap(java.util.Map<ServiceInfo.Fields,java.lang.String> qualifiedNameMap)

    - #### getType

          public java.lang.String getType()

      Fully qualified service type name, such as `_http._tcp.local.`
      Specified by:
        `getType` in class `ServiceInfo`
      Returns:
        service type name

    - #### getTypeWithSubtype

          public java.lang.String getTypeWithSubtype()

      Fully qualified service type name with the subtype if appropriate, such as `_printer._sub._http._tcp.local.`
      Specified by:
        `getTypeWithSubtype` in class `ServiceInfo`
      Returns:
        service type name

    - #### getName

          public java.lang.String getName()

      Unqualified service instance name, such as `foobar` .
      Specified by:
        `getName` in class `ServiceInfo`
      Returns:
        service name

    - #### getKey

          public java.lang.String getKey()

      The key is used to retrieve service info in hash tables.
      The key is the lower case qualified name.
      Specified by:
        `getKey` in class `ServiceInfo`
      Returns:
        the key

    - #### getQualifiedName

          public java.lang.String getQualifiedName()

      Fully qualified service name, such as `foobar._http._tcp.local.` .
      Specified by:
        `getQualifiedName` in class `ServiceInfo`
      Returns:
        qualified service name

    - #### getServer

          public java.lang.String getServer()

      Description copied from class: `ServiceInfo`
      Get the name of the server.
      Specified by:
        `getServer` in class `ServiceInfo`
      Returns:
        server name
      See Also:
        `ServiceInfo.getServer()`

    - #### getHostAddress

          @Deprecated
          public java.lang.String getHostAddress()

      Deprecated.
      Returns the host IP address string in textual presentation.
      Note: This can be either an IPv4 or an IPv6 representation.
      Specified by:
        `getHostAddress` in class `ServiceInfo`
      Returns:
        the host raw IP address in a string format.
      See Also:
        `ServiceInfo.getHostAddresses()`

    - #### getHostAddresses

          public java.lang.String[] getHostAddresses()

      Returns the host IP addresses string in textual presentation.
      Specified by:
        `getHostAddresses` in class `ServiceInfo`
      Returns:
        list of host raw IP address in a string format.

    - #### getAddress

          @Deprecated
          public java.net.InetAddress getAddress()

      Deprecated.
      Get the host address of the service.
      Specified by:
        `getAddress` in class `ServiceInfo`
      Returns:
        host Internet address
      See Also:
        `ServiceInfo.getInetAddresses()`

    - #### getInetAddress

          @Deprecated
          public java.net.InetAddress getInetAddress()

      Deprecated.
      Get the InetAddress of the service. This will return the IPv4 if it exist, otherwise it return the IPv6 if set.
      Note: This return null if the service IP address cannot be resolved.
      Specified by:
        `getInetAddress` in class `ServiceInfo`
      Returns:
        Internet address
      See Also:
        `ServiceInfo.getInetAddresses()`

    - #### getInet4Address

          @Deprecated
          public java.net.Inet4Address getInet4Address()

      Deprecated.
      Get the IPv4 InetAddress of the service.
      Note: This return null if the service IPv4 address cannot be resolved.
      Specified by:
        `getInet4Address` in class `ServiceInfo`
      Returns:
        Internet address
      See Also:
        `ServiceInfo.getInet4Addresses()`

    - #### getInet6Address

          @Deprecated
          public java.net.Inet6Address getInet6Address()

      Deprecated.
      Get the IPv6 InetAddress of the service.
      Note: This return null if the service IPv6 address cannot be resolved.
      Specified by:
        `getInet6Address` in class `ServiceInfo`
      Returns:
        Internet address
      See Also:
        `ServiceInfo.getInet6Addresses()`

    - #### getInetAddresses

          public java.net.InetAddress[] getInetAddresses()

      Description copied from class: `ServiceInfo`
      Returns a list of all InetAddresses that can be used for this service.

      In a multi-homed environment service info can be associated with more than one address.

      Specified by:
        `getInetAddresses` in class `ServiceInfo`
      Returns:
        list of InetAddress objects

    - #### getInet4Addresses

          public java.net.Inet4Address[] getInet4Addresses()

      Description copied from class: `ServiceInfo`
      Returns a list of all IPv4 InetAddresses that can be used for this service.

      In a multi-homed environment service info can be associated with more than one address.

      Specified by:
        `getInet4Addresses` in class `ServiceInfo`
      Returns:
        list of InetAddress objects

    - #### getInet6Addresses

          public java.net.Inet6Address[] getInet6Addresses()

      Description copied from class: `ServiceInfo`
      Returns a list of all IPv6 InetAddresses that can be used for this service.

      In a multi-homed environment service info can be associated with more than one address.

      Specified by:
        `getInet6Addresses` in class `ServiceInfo`
      Returns:
        list of InetAddress objects

    - #### getPort

          public int getPort()

      Description copied from class: `ServiceInfo`
      Get the port for the service.
      Specified by:
        `getPort` in class `ServiceInfo`
      Returns:
        service port
      See Also:
        `ServiceInfo.getPort()`

    - #### getPriority

          public int getPriority()

      Description copied from class: `ServiceInfo`
      Get the priority of the service.
      Specified by:
        `getPriority` in class `ServiceInfo`
      Returns:
        service priority
      See Also:
        `ServiceInfo.getPriority()`

    - #### getWeight

          public int getWeight()

      Description copied from class: `ServiceInfo`
      Get the weight of the service.
      Specified by:
        `getWeight` in class `ServiceInfo`
      Returns:
        service weight
      See Also:
        `ServiceInfo.getWeight()`

    - #### getTextBytes

          public byte[] getTextBytes()

      Description copied from class: `ServiceInfo`
      Get the text for the service as raw bytes.
      Specified by:
        `getTextBytes` in class `ServiceInfo`
      Returns:
        raw service text
      See Also:
        `ServiceInfo.getTextBytes()`

    - #### getTextString

          @Deprecated
          public java.lang.String getTextString()

      Deprecated.
      Get the text for the service. This will interpret the text bytes as a UTF8 encoded string. Will return null if the bytes are not a valid UTF8 encoded string.
      Note: Do not use. This method make the assumption that the TXT record is one string. This is false. The TXT record is a series of key value pairs.
      Specified by:
        `getTextString` in class `ServiceInfo`
      Returns:
        service text
      See Also:
        `ServiceInfo.getPropertyNames()`, `ServiceInfo.getPropertyBytes(String)`, `ServiceInfo.getPropertyString(String)`

    - #### getURL

          @Deprecated
          public java.lang.String getURL()

      Deprecated.
      Description copied from class: `ServiceInfo`
      Get the URL for this service. An http URL is created by combining the address, port, and path properties.
      Specified by:
        `getURL` in class `ServiceInfo`
      Returns:
        service URL
      See Also:
        `ServiceInfo.getURLs()`

    - #### getURLs

          public java.lang.String[] getURLs()

      Description copied from class: `ServiceInfo`
      Get the list of URL for this service. An http URL is created by combining the address, port, and path properties.
      Specified by:
        `getURLs` in class `ServiceInfo`
      Returns:
        list of service URL

    - #### getURL

          @Deprecated
          public java.lang.String getURL(java.lang.String protocol)

      Deprecated.
      Description copied from class: `ServiceInfo`
      Get the URL for this service. An URL is created by combining the protocol, address, port, and path properties.
      Specified by:
        `getURL` in class `ServiceInfo`
      Parameters:
        `protocol` - requested protocol
      Returns:
        service URL
      See Also:
        `ServiceInfo.getURLs()`

    - #### getURLs

          public java.lang.String[] getURLs(java.lang.String protocol)

      Description copied from class: `ServiceInfo`
      Get the list of URL for this service. An URL is created by combining the protocol, address, port, and path properties.
      Specified by:
        `getURLs` in class `ServiceInfo`
      Parameters:
        `protocol` - requested protocol
      Returns:
        list of service URL

    - #### getPropertyBytes

          public byte[] getPropertyBytes(java.lang.String name)

      Get a property of the service. This involves decoding the text bytes into a property list. Returns null if the property is not found or the text data could not be decoded correctly.
      Specified by:
        `getPropertyBytes` in class `ServiceInfo`
      Parameters:
        `name` - property name
      Returns:
        raw property text

    - #### getPropertyString

          public java.lang.String getPropertyString(java.lang.String name)

      Get a property of the service. This involves decoding the text bytes into a property list. Returns null if the property is not found, the text data could not be decoded correctly, or the resulting bytes are not a valid UTF8 string.
      Specified by:
        `getPropertyString` in class `ServiceInfo`
      Parameters:
        `name` - property name
      Returns:
        property text

    - #### getPropertyNames

          public java.util.Enumeration<java.lang.String> getPropertyNames()

      Enumeration of the property names.
      Specified by:
        `getPropertyNames` in class `ServiceInfo`
      Returns:
        property name enumeration

    - #### getApplication

          public java.lang.String getApplication()

      Returns the application of the service info suitable for printing.
      Specified by:
        `getApplication` in class `ServiceInfo`
      Returns:
        service application

    - #### getDomain

          public java.lang.String getDomain()

      Returns the domain of the service info suitable for printing.
      Specified by:
        `getDomain` in class `ServiceInfo`
      Returns:
        service domain

    - #### getProtocol

          public java.lang.String getProtocol()

      Returns the protocol of the service info suitable for printing.
      Specified by:
        `getProtocol` in class `ServiceInfo`
      Returns:
        service protocol

    - #### getSubtype

          public java.lang.String getSubtype()

      Returns the sub type of the service info suitable for printing.
      Specified by:
        `getSubtype` in class `ServiceInfo`
      Returns:
        service sub type

    - #### getQualifiedNameMap

          public java.util.Map<ServiceInfo.Fields,java.lang.String> getQualifiedNameMap()

      Returns a dictionary of the fully qualified name component of this service.
      Specified by:
        `getQualifiedNameMap` in class `ServiceInfo`
      Returns:
        dictionary of the fully qualified name components

    - #### updateRecord

          public void updateRecord(DNSCache dnsCache,
                          long now,
                          DNSEntry rec)

      JmDNS callback to update a DNS record.
      Parameters:
        `dnsCache` -
        `now` -
        `rec` -

    - #### hasData

          public boolean hasData()

      Returns true if the service info is filled with data.
      Specified by:
        `hasData` in class `ServiceInfo`
      Returns:
        `true` if the service info has data, `false` otherwise.

    - #### advanceState

          public boolean advanceState(DNSTask task)

      Sets the state and notifies all objects that wait on the ServiceInfo.
      Specified by:
        `advanceState` in interface `DNSStatefulObject`
      Parameters:
        `task` - associated task
      Returns:
        `true`false otherwise.
      See Also:
        `DNSState.advance()`

    - #### revertState

          public boolean revertState()

      Sets the state and notifies all objects that wait on the ServiceInfo.
      Specified by:
        `revertState` in interface `DNSStatefulObject`
      Returns:
        `true`false otherwise.
      See Also:
        `DNSState.revert()`

    - #### cancelState

          public boolean cancelState()

      Sets the state and notifies all objects that wait on the ServiceInfo.
      Specified by:
        `cancelState` in interface `DNSStatefulObject`
      Returns:
        `true`false otherwise.

    - #### closeState

          public boolean closeState()

      Sets the state and notifies all objects that wait on the ServiceInfo.
      Specified by:
        `closeState` in interface `DNSStatefulObject`
      Returns:
        `true`false otherwise.

    - #### recoverState

          public boolean recoverState()

      Sets the state and notifies all objects that wait on the ServiceInfo.
      Specified by:
        `recoverState` in interface `DNSStatefulObject`
      Returns:
        `true`false otherwise.

    - #### removeAssociationWithTask

          public void removeAssociationWithTask(DNSTask task)

      Remove the association of the task with this Object.
      Specified by:
        `removeAssociationWithTask` in interface `DNSStatefulObject`
      Parameters:
        `task` - associated task

    - #### associateWithTask

          public void associateWithTask(DNSTask task,
                               DNSState state)

      Sets the task associated with this Object.
      Specified by:
        `associateWithTask` in interface `DNSStatefulObject`
      Parameters:
        `task` - associated task
        `state` - state of the task

    - #### isAssociatedWithTask

          public boolean isAssociatedWithTask(DNSTask task,
                                     DNSState state)

      Checks if this object is associated with the task and in the same state.
      Specified by:
        `isAssociatedWithTask` in interface `DNSStatefulObject`
      Parameters:
        `task` - associated task
        `state` - state of the task
      Returns:
        `true` is the task is associated with this object, `false` otherwise.

    - #### isProbing

          public boolean isProbing()

      Returns true, if this is a probing state.
      Specified by:
        `isProbing` in interface `DNSStatefulObject`
      Returns:
        `true` if probing state, `false` otherwise

    - #### isAnnouncing

          public boolean isAnnouncing()

      Returns true, if this is an announcing state.
      Specified by:
        `isAnnouncing` in interface `DNSStatefulObject`
      Returns:
        `true` if announcing state, `false` otherwise

    - #### isAnnounced

          public boolean isAnnounced()

      Returns true, if this is an announced state.
      Specified by:
        `isAnnounced` in interface `DNSStatefulObject`
      Returns:
        `true` if announced state, `false` otherwise

    - #### isCanceling

          public boolean isCanceling()

      Returns true, if this is a canceling state.
      Specified by:
        `isCanceling` in interface `DNSStatefulObject`
      Returns:
        `true` if canceling state, `false` otherwise

    - #### isCanceled

          public boolean isCanceled()

      Returns true, if this is a canceled state.
      Specified by:
        `isCanceled` in interface `DNSStatefulObject`
      Returns:
        `true` if canceled state, `false` otherwise

    - #### isClosing

          public boolean isClosing()

      Returns true, if this is a closing state.
      Specified by:
        `isClosing` in interface `DNSStatefulObject`
      Returns:
        `true` if closing state, `false` otherwise

    - #### isClosed

          public boolean isClosed()

      Returns true, if this is a closed state.
      Specified by:
        `isClosed` in interface `DNSStatefulObject`
      Returns:
        `true` if closed state, `false` otherwise

    - #### waitForAnnounced

          public boolean waitForAnnounced(long timeout)

      Waits for the object to be announced.
      Specified by:
        `waitForAnnounced` in interface `DNSStatefulObject`
      Parameters:
        `timeout` - the maximum time to wait in milliseconds.
      Returns:
        `true` if the object is announced, `false` otherwise

    - #### waitForCanceled

          public boolean waitForCanceled(long timeout)

      Waits for the object to be canceled.
      Specified by:
        `waitForCanceled` in interface `DNSStatefulObject`
      Parameters:
        `timeout` - the maximum time to wait in milliseconds.
      Returns:
        `true` if the object is canceled, `false` otherwise

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### getNiceTextString

          public java.lang.String getNiceTextString()

      Returns a description of the service info suitable for printing.
      Specified by:
        `getNiceTextString` in class `ServiceInfo`
      Returns:
        service info description

    - #### clone

          public ServiceInfoImpl clone()

      Overrides:
        `clone` in class `ServiceInfo`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### answers

          public java.util.Collection<DNSRecord> answers(boolean unique,
                                                int ttl,
                                                HostInfo localHost)

    - #### setText

          public void setText(byte[] text)
                       throws java.lang.IllegalStateException

      Set the text for the service. Setting the text will fore a re-announce of the service.
      Specified by:
        `setText` in class `ServiceInfo`
      Parameters:
        `text` - the raw byte representation of the text field.
      Throws:
        `java.lang.IllegalStateException` - if attempting to set the text for a non persistent service info.

    - #### setText

          public void setText(java.util.Map<java.lang.String,?> props)
                       throws java.lang.IllegalStateException

      Set the text for the service. Setting the text will fore a re-announce of the service.
      Specified by:
        `setText` in class `ServiceInfo`
      Parameters:
        `props` - a key=value map that will be encoded into raw bytes.
      Throws:
        `java.lang.IllegalStateException` - if attempting to set the text for a non persistent service info.

    - #### setDns

          public void setDns(JmDNSImpl dns)

    - #### getDns

          public JmDNSImpl getDns()

      Returns the DNS associated with this object.
      Specified by:
        `getDns` in interface `DNSStatefulObject`
      Returns:
        DNS resolver

    - #### isPersistent

          public boolean isPersistent()

      Returns `true` if ServiceListener.resolveService will be called whenever new new information is received.
      Specified by:
        `isPersistent` in class `ServiceInfo`
      Returns:
        the persistent

    - #### setNeedTextAnnouncing

          public void setNeedTextAnnouncing(boolean needTextAnnouncing)

      Parameters:
        `needTextAnnouncing` - the needTextAnnouncing to set

    - #### needTextAnnouncing

          public boolean needTextAnnouncing()

      Returns:
        the needTextAnnouncing