Top Description Fields Constructors Methods
io.netty5.channel

public Class DefaultAddressedEnvelope<M, A extends java.net.SocketAddress>

extends Object
implements AddressedEnvelope<M, A extends SocketAddress>
Class Inheritance
All Implemented Interfaces
io.netty5.channel.AddressedEnvelope
Known Direct Subclasses
io.netty5.channel.BufferAddressedEnvelope
Type Parameters
<M>
the type of the wrapped message
<A>
the type of the recipient address
Imports
io.netty5.util.internal.StringUtil, java.net.SocketAddress

The default AddressedEnvelope implementation.

Field Summary

Modifier and TypeField and Description
private final M
private final A
private final A

Constructor Summary

AccessConstructor and Description
public
DefaultAddressedEnvelope(M message, A recipient, A sender)

Creates a new instance with the specified message, recipient address, and sender address.

public
DefaultAddressedEnvelope(M message, A recipient)

Creates a new instance with the specified message and recipient address.

Method Summary

Modifier and TypeMethod and Description
public M
content()

Implements io.netty5.channel.AddressedEnvelope.content.

Returns the message wrapped by this envelope message.
public A
recipient()

Implements io.netty5.channel.AddressedEnvelope.recipient.

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

Implements io.netty5.channel.AddressedEnvelope.sender.

Returns the address of the sender of this message.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

messageback to summary
private final M message
recipientback to summary
private final A recipient
senderback to summary
private final A sender

Constructor Detail

DefaultAddressedEnvelopeback to summary
public DefaultAddressedEnvelope(M message, A recipient, A sender)

Creates a new instance with the specified message, recipient address, and sender address.

DefaultAddressedEnvelopeback to summary
public DefaultAddressedEnvelope(M message, A recipient)

Creates a new instance with the specified message and recipient address. The sender address becomes null.

Method Detail

contentback to summary
public M content()

Implements io.netty5.channel.AddressedEnvelope.content.

Doc from io.netty5.channel.AddressedEnvelope.content.

Returns the message wrapped by this envelope message.

Annotations
@Override
recipientback to summary
public A recipient()

Implements io.netty5.channel.AddressedEnvelope.recipient.

Doc from io.netty5.channel.AddressedEnvelope.recipient.

Returns the address of the recipient of this message.

Annotations
@Override
senderback to summary
public A sender()

Implements io.netty5.channel.AddressedEnvelope.sender.

Doc from io.netty5.channel.AddressedEnvelope.sender.

Returns the address of the sender of this message.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override