Class DefaultAddressedEnvelope<M,A extends SocketAddress>

java.lang.Object
io.netty.channel.DefaultAddressedEnvelope<M,A>
Type Parameters:
M - the type of the wrapped message
A - the type of the recipient address
All Implemented Interfaces:
AddressedEnvelope<M,A>, ReferenceCounted
Direct Known Subclasses:
DatagramPacket, DomainDatagramPacket

public class DefaultAddressedEnvelope<M,A extends SocketAddress> extends Object implements AddressedEnvelope<M,A>
The default AddressedEnvelope implementation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final M
     
    private final A
     
    private final A
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefaultAddressedEnvelope(M message, A recipient)
    Creates a new instance with the specified message and recipient address.
    DefaultAddressedEnvelope(M message, A recipient, A sender)
    Creates a new instance with the specified message, recipient address, and sender 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.
    int
    Returns the reference count of this object.
    boolean
    Decreases the reference count by 1 and deallocates this object if the reference count reaches at 0.
    boolean
    release(int decrement)
    Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0.
    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(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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait