Package javax.jmdns.impl
Class DNSRecord.Pointer
- java.lang.Object
-
- javax.jmdns.impl.DNSEntry
-
- javax.jmdns.impl.DNSRecord
-
- javax.jmdns.impl.DNSRecord.Pointer
-
-
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 private java.lang.String
_alias
-
Fields inherited from class javax.jmdns.impl.DNSEntry
_qualifiedNameMap
-
-
Constructor Summary
Constructors Constructor Description Pointer(java.lang.String name, DNSRecordClass recordClass, boolean unique, int ttl, java.lang.String alias)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) DNSOutgoing
addAnswer(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.lang.String
getAlias()
ServiceEvent
getServiceEvent(JmDNSImpl dns)
Creates and return a service event for this record.ServiceInfo
getServiceInfo(boolean persistent)
Return a service information associated with that record if appropriate.(package private) boolean
handleQuery(JmDNSImpl dns, long expirationTime)
Handles a query represented by this record.(package private) boolean
handleResponse(JmDNSImpl dns)
Handles a response represented by this record.boolean
isSameEntry(DNSEntry entry)
Check if two entries have exactly the same name, type, and class.boolean
isSingleValued()
Determine if a record can have multiple values in the cache.(package private) boolean
sameValue(DNSRecord other)
True if this record has the same value as some other record.protected void
toString(java.lang.StringBuilder sb)
(package private) void
write(DNSOutgoing.MessageOutputStream out)
Write this record into an outgoing message.-
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
-
Methods inherited from class javax.jmdns.impl.DNSEntry
compareTo, getKey, getName, getQualifiedNameMap, getRecordClass, getRecordType, getSubtype, getType, hashCode, isDomainDiscoveryQuery, isReverseLookup, isSameRecordClass, isSameType, isServicesDiscoveryMetaQuery, isUnique, isV4ReverseLookup, isV6ReverseLookup, matchRecordClass, matchRecordType, sameSubtype, toByteArray, toByteArray, toString
-
-
-
-
Constructor Detail
-
Pointer
public Pointer(java.lang.String name, DNSRecordClass recordClass, boolean unique, int ttl, java.lang.String alias)
-
-
Method Detail
-
isSameEntry
public boolean isSameEntry(DNSEntry entry)
Description copied from class:DNSEntry
Check if two entries have exactly the same name, type, and class.- Overrides:
isSameEntry
in classDNSEntry
- Returns:
true
if the two entries have are for the same record,false
otherwise
-
write
void write(DNSOutgoing.MessageOutputStream out)
Description copied from class:DNSRecord
Write this record into an outgoing message.
-
sameValue
boolean sameValue(DNSRecord other)
Description copied from class:DNSRecord
True if this record has the same value as some other record.
-
isSingleValued
public boolean isSingleValued()
Description copied from class:DNSRecord
Determine if a record can have multiple values in the cache.- Specified by:
isSingleValued
in classDNSRecord
- Returns:
false
if this record can have multiple values in the cache,true
otherwise.
-
handleQuery
boolean handleQuery(JmDNSImpl dns, long expirationTime)
Description copied from class:DNSRecord
Handles a query represented by this record.- Specified by:
handleQuery
in 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)
Description copied from class:DNSRecord
Handles a response represented by this record.- Specified by:
handleResponse
in classDNSRecord
- Returns:
- Returns true if a conflict with one of the services registered with JmDNS or with the hostname occured.
-
getAlias
java.lang.String getAlias()
-
addAnswer
DNSOutgoing addAnswer(JmDNSImpl dns, DNSIncoming in, java.net.InetAddress addr, int port, DNSOutgoing out) throws java.io.IOException
Description copied from class:DNSRecord
Adds this as an answer to the provided outgoing datagram.
-
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 classDNSRecord
- Parameters:
persistent
- iftrue
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 classDNSRecord
- Parameters:
dns
- DNS serviced by this event- Returns:
- service event
-
-