Package io.netty.resolver.dns
Class DnsNameResolver.AddressedEnvelopeAdapter
- java.lang.Object
-
- io.netty.resolver.dns.DnsNameResolver.AddressedEnvelopeAdapter
-
- All Implemented Interfaces:
AddressedEnvelope<DnsResponse,java.net.InetSocketAddress>,ReferenceCounted
- Enclosing class:
- DnsNameResolver
private static final class DnsNameResolver.AddressedEnvelopeAdapter extends java.lang.Object implements AddressedEnvelope<DnsResponse,java.net.InetSocketAddress>
-
-
Field Summary
Fields Modifier and Type Field Description private java.net.InetSocketAddressrecipientprivate DnsResponseresponseprivate java.net.InetSocketAddresssender
-
Constructor Summary
Constructors Constructor Description AddressedEnvelopeAdapter(java.net.InetSocketAddress sender, java.net.InetSocketAddress recipient, DnsResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DnsResponsecontent()Returns the message wrapped by this envelope message.booleanequals(java.lang.Object obj)inthashCode()java.net.InetSocketAddressrecipient()Returns 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.
-
-
-
Field Detail
-
sender
private final java.net.InetSocketAddress sender
-
recipient
private final java.net.InetSocketAddress recipient
-
response
private final DnsResponse response
-
-
Constructor Detail
-
AddressedEnvelopeAdapter
AddressedEnvelopeAdapter(java.net.InetSocketAddress sender, java.net.InetSocketAddress recipient, DnsResponse response)
-
-
Method Detail
-
content
public DnsResponse 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
public AddressedEnvelope<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
public AddressedEnvelope<DnsResponse,java.net.InetSocketAddress> retain(int increment)
Description copied from interface:ReferenceCountedIncreases the reference count by the specifiedincrement.- Specified by:
retainin interfaceAddressedEnvelope<DnsResponse,java.net.InetSocketAddress>- Specified by:
retainin interfaceReferenceCounted
-
touch
public AddressedEnvelope<DnsResponse,java.net.InetSocketAddress> 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
public AddressedEnvelope<DnsResponse,java.net.InetSocketAddress> touch(java.lang.Object hint)
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
-
-