Interface AddressedEnvelope<M, A extends java.net.SocketAddress>

Type Parameters:
M - the type of the wrapped message
A - the type of the address
All Superinterfaces:
ReferenceCounted
All Known Implementing Classes:
DatagramDnsQuery, DatagramDnsResponse, DatagramPacket, DefaultAddressedEnvelope, DnsQueryContext.AddressedEnvelopeAdapter, DomainDatagramPacket, SegmentedDatagramPacket, SegmentedDatagramPacket

public interface AddressedEnvelope<M, A extends java.net.SocketAddress> extends ReferenceCounted
A message that wraps another message with a sender address and a recipient address.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the message wrapped by this envelope message.
    Returns the address of the recipient of this message.
    Increases the reference count by 1.
    retain(int increment)
    Increases the reference count by the specified increment.
    Returns the address of the sender of this message.
    Records the current access location of this object for debugging purposes.
    touch(java.lang.Object hint)
    Records the current access location of this object with an additional arbitrary information for debugging purposes.

    Methods inherited from interface ReferenceCounted

    refCnt, release, release
  • Method Details

    • content

      M content()
      Returns the message wrapped by this envelope message.
    • sender

      A sender()
      Returns the address of the sender of this message.
    • recipient

      A recipient()
      Returns the address of the recipient of this message.
    • retain

      AddressedEnvelope<M,A> retain()
      Description copied from interface: ReferenceCounted
      Increases the reference count by 1.
      Specified by:
      retain in interface ReferenceCounted
    • retain

      AddressedEnvelope<M,A> retain(int increment)
      Description copied from interface: ReferenceCounted
      Increases the reference count by the specified increment.
      Specified by:
      retain in interface ReferenceCounted
    • 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 via ResourceLeakDetector. This method is a shortcut to touch(null).
      Specified by:
      touch in interface ReferenceCounted
    • touch

      AddressedEnvelope<M,A> 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 via ResourceLeakDetector.
      Specified by:
      touch in interface ReferenceCounted