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.InetSocketAddress
recipient
private DnsResponse
response
private java.net.InetSocketAddress
sender
-
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 DnsResponse
content()
Returns the message wrapped by this envelope message.boolean
equals(java.lang.Object obj)
int
hashCode()
java.net.InetSocketAddress
recipient()
Returns the address of the recipient of this message.int
refCnt()
Returns the reference count of this object.boolean
release()
Decreases the reference count by1
and deallocates this object if the reference count reaches at0
.boolean
release(int decrement)
Decreases the reference count by the specifieddecrement
and 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.InetSocketAddress
sender()
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:AddressedEnvelope
Returns the message wrapped by this envelope message.- Specified by:
content
in interfaceAddressedEnvelope<DnsResponse,java.net.InetSocketAddress>
-
sender
public java.net.InetSocketAddress sender()
Description copied from interface:AddressedEnvelope
Returns the address of the sender of this message.- Specified by:
sender
in interfaceAddressedEnvelope<DnsResponse,java.net.InetSocketAddress>
-
recipient
public java.net.InetSocketAddress recipient()
Description copied from interface:AddressedEnvelope
Returns the address of the recipient of this message.- Specified by:
recipient
in interfaceAddressedEnvelope<DnsResponse,java.net.InetSocketAddress>
-
retain
public AddressedEnvelope<DnsResponse,java.net.InetSocketAddress> retain()
Description copied from interface:ReferenceCounted
Increases the reference count by1
.- Specified by:
retain
in interfaceAddressedEnvelope<DnsResponse,java.net.InetSocketAddress>
- Specified by:
retain
in interfaceReferenceCounted
-
retain
public AddressedEnvelope<DnsResponse,java.net.InetSocketAddress> retain(int increment)
Description copied from interface:ReferenceCounted
Increases the reference count by the specifiedincrement
.- Specified by:
retain
in interfaceAddressedEnvelope<DnsResponse,java.net.InetSocketAddress>
- Specified by:
retain
in interfaceReferenceCounted
-
touch
public AddressedEnvelope<DnsResponse,java.net.InetSocketAddress> touch()
Description copied from interface:ReferenceCounted
Records 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:
touch
in interfaceAddressedEnvelope<DnsResponse,java.net.InetSocketAddress>
- Specified by:
touch
in interfaceReferenceCounted
-
touch
public AddressedEnvelope<DnsResponse,java.net.InetSocketAddress> touch(java.lang.Object hint)
Description copied from interface:ReferenceCounted
Records 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:
touch
in interfaceAddressedEnvelope<DnsResponse,java.net.InetSocketAddress>
- Specified by:
touch
in interfaceReferenceCounted
-
refCnt
public int refCnt()
Description copied from interface:ReferenceCounted
Returns the reference count of this object. If0
, it means this object has been deallocated.- Specified by:
refCnt
in interfaceReferenceCounted
-
release
public boolean release()
Description copied from interface:ReferenceCounted
Decreases the reference count by1
and deallocates this object if the reference count reaches at0
.- Specified by:
release
in interfaceReferenceCounted
- Returns:
true
if and only if the reference count became0
and this object has been deallocated
-
release
public boolean release(int decrement)
Description copied from interface:ReferenceCounted
Decreases the reference count by the specifieddecrement
and deallocates this object if the reference count reaches at0
.- Specified by:
release
in interfaceReferenceCounted
- Returns:
true
if and only if the reference count became0
and this object has been deallocated
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-