Module io.netty5.transport
Package io.netty5.channel
Class DefaultAddressedEnvelope<M,A extends SocketAddress>
- java.lang.Object
-
- io.netty5.channel.DefaultAddressedEnvelope<M,A>
-
- Type Parameters:
M
- the type of the wrapped messageA
- the type of the recipient address
- All Implemented Interfaces:
AddressedEnvelope<M,A>
- Direct Known Subclasses:
BufferAddressedEnvelope
public class DefaultAddressedEnvelope<M,A extends SocketAddress> extends Object implements AddressedEnvelope<M,A>
The defaultAddressedEnvelope
implementation.
-
-
Constructor Summary
Constructors Constructor Description DefaultAddressedEnvelope(M message, A recipient)
Creates a new instance with the specifiedmessage
andrecipient
address.DefaultAddressedEnvelope(M message, A recipient, A sender)
Creates a new instance with the specifiedmessage
,recipient
address, andsender
address.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description M
content()
Returns the message wrapped by this envelope message.A
recipient()
Returns the address of the recipient of this message.A
sender()
Returns the address of the sender of this message.String
toString()
-
-
-
Method Detail
-
content
public M content()
Description copied from interface:AddressedEnvelope
Returns the message wrapped by this envelope message.- Specified by:
content
in interfaceAddressedEnvelope<M,A extends SocketAddress>
-
sender
public A sender()
Description copied from interface:AddressedEnvelope
Returns the address of the sender of this message.- Specified by:
sender
in interfaceAddressedEnvelope<M,A extends SocketAddress>
-
recipient
public A recipient()
Description copied from interface:AddressedEnvelope
Returns the address of the recipient of this message.- Specified by:
recipient
in interfaceAddressedEnvelope<M,A extends SocketAddress>
-
-