Package javax.jmdns.impl
Class DNSRecord.Address
- java.lang.Object
-
- javax.jmdns.impl.DNSEntry
-
- javax.jmdns.impl.DNSRecord
-
- javax.jmdns.impl.DNSRecord.Address
-
- Direct Known Subclasses:
DNSRecord.IPv4Address,DNSRecord.IPv6Address
- Enclosing class:
- DNSRecord
public abstract static class DNSRecord.Address extends DNSRecord
Address record.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.jmdns.impl.DNSRecord
DNSRecord.Address, DNSRecord.HostInformation, DNSRecord.IPv4Address, DNSRecord.IPv6Address, DNSRecord.Pointer, DNSRecord.Service, DNSRecord.Text
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.net.InetAddress_addrprivate static org.slf4j.Loggerlogger1-
Fields inherited from class javax.jmdns.impl.DNSEntry
_qualifiedNameMap
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAddress(java.lang.String name, DNSRecordType type, DNSRecordClass recordClass, boolean unique, int ttl, byte[] rawAddress)protectedAddress(java.lang.String name, DNSRecordType type, DNSRecordClass recordClass, boolean unique, int ttl, java.net.InetAddress addr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) DNSOutgoingaddAnswer(JmDNSImpl dns, DNSIncoming in, java.net.InetAddress addr, int port, DNSOutgoing out)Adds this as an answer to the provided outgoing datagram.(package private) java.net.InetAddressgetAddress()ServiceEventgetServiceEvent(JmDNSImpl dns)Creates and return a service event for this record.ServiceInfogetServiceInfo(boolean persistent)Return a service information associated with that record if appropriate.(package private) booleanhandleQuery(JmDNSImpl dns, long expirationTime)Does the necessary actions, when this as a query.(package private) booleanhandleResponse(JmDNSImpl dns)Does the necessary actions, when this as a response.booleanisSingleValued()Determine if a record can have multiple values in the cache.(package private) booleansame(DNSRecord other)(package private) booleansameName(DNSRecord other)(package private) booleansameValue(DNSRecord other)True if this record has the same value as some other record.protected voidtoByteArray(java.io.DataOutputStream dout)Creates a byte array representation of this record.protected voidtoString(java.lang.StringBuilder sb)-
Methods inherited from class javax.jmdns.impl.DNSRecord
equals, getCreated, getExpirationTime, getRecordSource, getRemainingTTL, getServiceInfo, getTTL, incrementRefreshPercentage, isExpired, isStale, isStaleAndShouldBeRefreshed, resetTTL, sameType, setRecordSource, setTTL, setWillExpireSoon, suppressedBy, suppressedBy, write
-
Methods inherited from class javax.jmdns.impl.DNSEntry
compareTo, getKey, getName, getQualifiedNameMap, getRecordClass, getRecordType, getSubtype, getType, hashCode, isDomainDiscoveryQuery, isReverseLookup, isSameEntry, isSameRecordClass, isSameType, isServicesDiscoveryMetaQuery, isUnique, isV4ReverseLookup, isV6ReverseLookup, matchRecordClass, matchRecordType, sameSubtype, toByteArray, toString
-
-
-
-
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
-
same
boolean same(DNSRecord other)
-
sameName
boolean sameName(DNSRecord other)
-
sameValue
boolean sameValue(DNSRecord other)
Description copied from class:DNSRecordTrue if this record has the same value as some other record.
-
isSingleValued
public boolean isSingleValued()
Description copied from class:DNSRecordDetermine if a record can have multiple values in the cache.- Specified by:
isSingleValuedin classDNSRecord- Returns:
falseif this record can have multiple values in the cache,trueotherwise.
-
getAddress
java.net.InetAddress getAddress()
-
toByteArray
protected void toByteArray(java.io.DataOutputStream dout) throws java.io.IOExceptionCreates 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:
toByteArrayin classDNSEntry- Throws:
java.io.IOException
-
handleQuery
boolean handleQuery(JmDNSImpl dns, long expirationTime)
Does the necessary actions, when this as a query.- Specified by:
handleQueryin classDNSRecord- 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:
handleResponsein classDNSRecord- Returns:
- Returns true if a conflict with one of the services registered with JmDNS or with the hostname occured.
-
addAnswer
DNSOutgoing addAnswer(JmDNSImpl dns, DNSIncoming in, java.net.InetAddress addr, int port, DNSOutgoing out) throws java.io.IOException
Description copied from class:DNSRecordAdds this as an answer to the provided outgoing datagram.
-
getServiceInfo
public ServiceInfo getServiceInfo(boolean persistent)
Description copied from class:DNSRecordReturn a service information associated with that record if appropriate.- Specified by:
getServiceInfoin classDNSRecord- Parameters:
persistent- iftrueServiceListener.resolveService will be called whenever new new information is received.- Returns:
- service information
-
getServiceEvent
public ServiceEvent getServiceEvent(JmDNSImpl dns)
Description copied from class:DNSRecordCreates and return a service event for this record.- Specified by:
getServiceEventin classDNSRecord- Parameters:
dns- DNS serviced by this event- Returns:
- service event
-
-