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
Address record.
-
Nested Class Summary
Nested classes/interfaces inherited from class DNSRecord
DNSRecord.Address, DNSRecord.HostInformation, DNSRecord.IPv4Address, DNSRecord.IPv6Address, DNSRecord.Pointer, DNSRecord.Service, DNSRecord.Text -
Field Summary
FieldsFields inherited from class DNSEntry
_qualifiedNameMap -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAddress(String name, DNSRecordType type, DNSRecordClass recordClass, boolean unique, int ttl, byte[] rawAddress) protectedAddress(String name, DNSRecordType type, DNSRecordClass recordClass, boolean unique, int ttl, InetAddress addr) -
Method Summary
Modifier and TypeMethodDescription(package private) DNSOutgoingaddAnswer(JmDNSImpl dns, DNSIncoming in, InetAddress addr, int port, DNSOutgoing out) Adds this as an answer to the provided outgoing datagram.(package private) InetAddressgetServiceEvent(JmDNSImpl dns) Creates and return a service event for this record.getServiceInfo(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.booleanDetermine if a record can have multiple values in the cache.(package private) boolean(package private) boolean(package private) booleanTrue if this record has the same value as some other record.protected voidtoByteArray(DataOutputStream dout) Creates a byte array representation of this record.protected voidMethods inherited from class DNSRecord
equals, getCreated, getExpirationTime, getRecordSource, getRemainingTTL, getServiceInfo, getTTL, incrementRefreshPercentage, isExpired, isStale, isStaleAndShouldBeRefreshed, resetTTL, sameType, setRecordSource, setTTL, setWillExpireSoon, suppressedBy, suppressedBy, writeMethods inherited from class DNSEntry
compareTo, getKey, getName, getQualifiedNameMap, getRecordClass, getRecordType, getSubtype, getType, hashCode, isDomainDiscoveryQuery, isReverseLookup, isSameEntry, isSameRecordClass, isSameType, isServicesDiscoveryMetaQuery, isUnique, isV4ReverseLookup, isV6ReverseLookup, matchRecordClass, matchRecordType, sameSubtype, toByteArray, toString
-
Field Details
-
logger1
private static org.slf4j.Logger logger1 -
_addr
InetAddress _addr
-
-
Constructor Details
-
Address
protected Address(String name, DNSRecordType type, DNSRecordClass recordClass, boolean unique, int ttl, InetAddress addr) -
Address
protected Address(String name, DNSRecordType type, DNSRecordClass recordClass, boolean unique, int ttl, byte[] rawAddress)
-
-
Method Details
-
same
-
sameName
-
sameValue
-
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
InetAddress getAddress() -
toByteArray
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:
toByteArrayin classDNSEntry- Parameters:
dout-- Throws:
IOException
-
handleQuery
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
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, InetAddress addr, int port, DNSOutgoing out) throws IOException Description copied from class:DNSRecordAdds this as an answer to the provided outgoing datagram.- Specified by:
addAnswerin classDNSRecord- Throws:
IOException
-
getServiceInfo
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
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
-
toString
-