Class DNSRecord.Address

    • Field Detail

      • logger1

        private static org.slf4j.Logger logger1
      • _addr

        java.net.InetAddress _addr
    • Constructor Detail

      • Address

        protected Address​(java.lang.String name,
                          DNSRecordType type,
                          DNSRecordClass recordClass,
                          boolean unique,
                          int ttl,
                          java.net.InetAddress addr)
      • Address

        protected Address​(java.lang.String name,
                          DNSRecordType type,
                          DNSRecordClass recordClass,
                          boolean unique,
                          int ttl,
                          byte[] rawAddress)
    • Method Detail

      • sameName

        boolean sameName​(DNSRecord other)
      • sameValue

        boolean sameValue​(DNSRecord other)
        Description copied from class: DNSRecord
        True if this record has the same value as some other record.
        Specified by:
        sameValue in class DNSRecord
      • isSingleValued

        public boolean isSingleValued()
        Description copied from class: DNSRecord
        Determine if a record can have multiple values in the cache.
        Specified by:
        isSingleValued in class DNSRecord
        Returns:
        false if this record can have multiple values in the cache, true otherwise.
      • getAddress

        java.net.InetAddress getAddress()
      • toByteArray

        protected void toByteArray​(java.io.DataOutputStream dout)
                            throws java.io.IOException
        Creates a byte array representation of this record. This is needed for tie-break tests according to draft-cheshire-dnsext-multicastdns-04.txt chapter 9.2.
        Overrides:
        toByteArray in class DNSEntry
        Throws:
        java.io.IOException
      • handleQuery

        boolean handleQuery​(JmDNSImpl dns,
                            long expirationTime)
        Does the necessary actions, when this as a query.
        Specified by:
        handleQuery in class DNSRecord
        Returns:
        Returns true if a conflict with one of the services registered with JmDNS or with the hostname occured.
      • handleResponse

        boolean handleResponse​(JmDNSImpl dns)
        Does the necessary actions, when this as a response.
        Specified by:
        handleResponse in class DNSRecord
        Returns:
        Returns true if a conflict with one of the services registered with JmDNS or with the hostname occured.
      • getServiceInfo

        public ServiceInfo getServiceInfo​(boolean persistent)
        Description copied from class: DNSRecord
        Return a service information associated with that record if appropriate.
        Specified by:
        getServiceInfo in class DNSRecord
        Parameters:
        persistent - if true ServiceListener.resolveService will be called whenever new new information is received.
        Returns:
        service information
      • getServiceEvent

        public ServiceEvent getServiceEvent​(JmDNSImpl dns)
        Description copied from class: DNSRecord
        Creates and return a service event for this record.
        Specified by:
        getServiceEvent in class DNSRecord
        Parameters:
        dns - DNS serviced by this event
        Returns:
        service event
      • toString

        protected void toString​(java.lang.StringBuilder sb)
        Overrides:
        toString in class DNSRecord