Class DnsQueryContext.AddressedEnvelopeAdapter
java.lang.Object
io.netty.resolver.dns.DnsQueryContext.AddressedEnvelopeAdapter
- All Implemented Interfaces:
AddressedEnvelope<DnsResponse, java.net.InetSocketAddress>, ReferenceCounted
- Enclosing class:
DnsQueryContext
private static final class DnsQueryContext.AddressedEnvelopeAdapter
extends java.lang.Object
implements AddressedEnvelope<DnsResponse, java.net.InetSocketAddress>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final java.net.InetSocketAddressprivate final DnsResponseprivate final java.net.InetSocketAddress -
Constructor Summary
ConstructorsConstructorDescriptionAddressedEnvelopeAdapter(java.net.InetSocketAddress sender, java.net.InetSocketAddress recipient, DnsResponse response) -
Method Summary
Modifier and TypeMethodDescriptioncontent()Returns the message wrapped by this envelope message.booleanequals(java.lang.Object obj) inthashCode()java.net.InetSocketAddressReturns the address of the recipient of this message.intrefCnt()Returns the reference count of this object.booleanrelease()Decreases the reference count by1and deallocates this object if the reference count reaches at0.booleanrelease(int decrement) Decreases the reference count by the specifieddecrementand deallocates this object if the reference count reaches at0.AddressedEnvelope<DnsResponse, java.net.InetSocketAddress> retain()Increases the reference count by1.AddressedEnvelope<DnsResponse, java.net.InetSocketAddress> retain(int increment) Increases the reference count by the specifiedincrement.java.net.InetSocketAddresssender()Returns the address of the sender of this message.AddressedEnvelope<DnsResponse, java.net.InetSocketAddress> touch()Records the current access location of this object for debugging purposes.AddressedEnvelope<DnsResponse, java.net.InetSocketAddress> touch(java.lang.Object hint) Records the current access location of this object with an additional arbitrary information for debugging purposes.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
sender
private final java.net.InetSocketAddress sender -
recipient
private final java.net.InetSocketAddress recipient -
response
-
-
Constructor Details
-
AddressedEnvelopeAdapter
AddressedEnvelopeAdapter(java.net.InetSocketAddress sender, java.net.InetSocketAddress recipient, DnsResponse response)
-
-
Method Details
-
content
Description copied from interface:AddressedEnvelopeReturns the message wrapped by this envelope message.- Specified by:
contentin interfaceAddressedEnvelope<DnsResponse, java.net.InetSocketAddress>
-
sender
public java.net.InetSocketAddress sender()Description copied from interface:AddressedEnvelopeReturns the address of the sender of this message.- Specified by:
senderin interfaceAddressedEnvelope<DnsResponse, java.net.InetSocketAddress>
-
recipient
public java.net.InetSocketAddress recipient()Description copied from interface:AddressedEnvelopeReturns the address of the recipient of this message.- Specified by:
recipientin interfaceAddressedEnvelope<DnsResponse, java.net.InetSocketAddress>
-
retain
Description copied from interface:ReferenceCountedIncreases the reference count by1.- Specified by:
retainin interfaceAddressedEnvelope<DnsResponse, java.net.InetSocketAddress>- Specified by:
retainin interfaceReferenceCounted
-
retain
Description copied from interface:ReferenceCountedIncreases the reference count by the specifiedincrement.- Specified by:
retainin interfaceAddressedEnvelope<DnsResponse, java.net.InetSocketAddress>- Specified by:
retainin interfaceReferenceCounted
-
touch
Description copied from interface:ReferenceCountedRecords the current access location of this object for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you viaResourceLeakDetector. This method is a shortcut totouch(null).- Specified by:
touchin interfaceAddressedEnvelope<DnsResponse, java.net.InetSocketAddress>- Specified by:
touchin interfaceReferenceCounted
-
touch
Description copied from interface:ReferenceCountedRecords the current access location of this object with an additional arbitrary information for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you viaResourceLeakDetector.- Specified by:
touchin interfaceAddressedEnvelope<DnsResponse, java.net.InetSocketAddress>- Specified by:
touchin interfaceReferenceCounted
-
refCnt
public int refCnt()Description copied from interface:ReferenceCountedReturns the reference count of this object. If0, it means this object has been deallocated.- Specified by:
refCntin interfaceReferenceCounted
-
release
public boolean release()Description copied from interface:ReferenceCountedDecreases the reference count by1and deallocates this object if the reference count reaches at0.- Specified by:
releasein interfaceReferenceCounted- Returns:
trueif and only if the reference count became0and this object has been deallocated
-
release
public boolean release(int decrement) Description copied from interface:ReferenceCountedDecreases the reference count by the specifieddecrementand deallocates this object if the reference count reaches at0.- Specified by:
releasein interfaceReferenceCounted- Returns:
trueif and only if the reference count became0and this object has been deallocated
-
equals
public boolean equals(java.lang.Object obj) - Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-