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 defaultAddressedEnvelopeimplementation.
-
-
Constructor Summary
Constructors Constructor Description DefaultAddressedEnvelope(M message, A recipient)Creates a new instance with the specifiedmessageandrecipientaddress.DefaultAddressedEnvelope(M message, A recipient, A sender)Creates a new instance with the specifiedmessage,recipientaddress, andsenderaddress.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mcontent()Returns the message wrapped by this envelope message.Arecipient()Returns the address of the recipient of this message.Asender()Returns the address of the sender of this message.StringtoString()
-
-
-
Method Detail
-
content
public M content()
Description copied from interface:AddressedEnvelopeReturns the message wrapped by this envelope message.- Specified by:
contentin interfaceAddressedEnvelope<M,A extends SocketAddress>
-
sender
public A sender()
Description copied from interface:AddressedEnvelopeReturns the address of the sender of this message.- Specified by:
senderin interfaceAddressedEnvelope<M,A extends SocketAddress>
-
recipient
public A recipient()
Description copied from interface:AddressedEnvelopeReturns the address of the recipient of this message.- Specified by:
recipientin interfaceAddressedEnvelope<M,A extends SocketAddress>
-
-