Package javax.jmdns.impl
Class DNSRecord.Service
- java.lang.Object
-
- javax.jmdns.impl.DNSEntry
-
- javax.jmdns.impl.DNSRecord
-
- javax.jmdns.impl.DNSRecord.Service
-
-
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
-
-
Constructor Summary
Constructors Constructor Description Service(String name, DNSRecordClass recordClass, boolean unique, int ttl, int priority, int weight, int port, String server)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetPort()intgetPriority()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.intgetWeight()booleanisSingleValued()Determine if a record can have multiple values in the cache.protected voidtoByteArray(DataOutputStream dout)protected voidtoString(StringBuilder sb)-
Methods inherited from class javax.jmdns.impl.DNSRecord
equals, getCreated, getRecordSource, getServiceInfo, getTTL, incrementRefreshPercentage, isExpired, isStale, isStaleAndShouldBeRefreshed, setRecordSource, setTTL
-
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
-
Service
public Service(String name, DNSRecordClass recordClass, boolean unique, int ttl, int priority, int weight, int port, String server)
-
-
Method Detail
-
toByteArray
protected void toByteArray(DataOutputStream dout) throws IOException
- Overrides:
toByteArrayin classDNSEntry- Throws:
IOException
-
getPriority
public int getPriority()
- Returns:
- the priority
-
getWeight
public int getWeight()
- Returns:
- the weight
-
getPort
public int getPort()
- Returns:
- the port
-
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.
-
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
-
toString
protected void toString(StringBuilder sb)
-
-