Module io.netty5.transport
Package io.netty5.channel
Class DefaultBufferAddressedEnvelope<A extends SocketAddress>
- java.lang.Object
-
- io.netty5.channel.DefaultAddressedEnvelope<Buffer,A>
-
- io.netty5.channel.BufferAddressedEnvelope<A,DefaultBufferAddressedEnvelope<A>>
-
- io.netty5.channel.DefaultBufferAddressedEnvelope<A>
-
- Type Parameters:
A- the type of the recipient and sender addresses.
- All Implemented Interfaces:
AddressedEnvelope<Buffer,A>,Resource<DefaultBufferAddressedEnvelope<A>>,AutoCloseable
public class DefaultBufferAddressedEnvelope<A extends SocketAddress> extends BufferAddressedEnvelope<A,DefaultBufferAddressedEnvelope<A>>
The defaultAddressedEnvelopeimplementation forBuffermessages.
-
-
Constructor Summary
Constructors Constructor Description DefaultBufferAddressedEnvelope(Buffer message, A recipient)Creates a new instance with the specifiedmessageandrecipientaddress.DefaultBufferAddressedEnvelope(Buffer 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 DefaultBufferAddressedEnvelope<A>replace(Buffer content)Create a new addressed envelope instance, that has the same recipient and sender as this one, but the given content.DefaultBufferAddressedEnvelope<A>touch(Object hint)Record the current access location for debugging purposes.-
Methods inherited from class io.netty5.channel.BufferAddressedEnvelope
close, isAccessible, send
-
Methods inherited from class io.netty5.channel.DefaultAddressedEnvelope
content, recipient, sender, toString
-
-
-
-
Method Detail
-
replace
public DefaultBufferAddressedEnvelope<A> replace(Buffer content)
Description copied from class:BufferAddressedEnvelopeCreate a new addressed envelope instance, that has the same recipient and sender as this one, but the given content.- Specified by:
replacein classBufferAddressedEnvelope<A extends SocketAddress,DefaultBufferAddressedEnvelope<A extends SocketAddress>>- Parameters:
content- The contents of the returned addressed envelope instance.- Returns:
- An addressed envelope instance that has the same recipient and sender as this one, but the given content.
-
touch
public DefaultBufferAddressedEnvelope<A> touch(Object hint)
Description copied from interface:ResourceRecord the current access location for debugging purposes. This information may be included if the resource throws a life-cycle related exception, or if it leaks. If this resource has already been closed, then this method has no effect.- Parameters:
hint- An optional hint about this access and its context. May benull.- Returns:
- This resource instance.
-
-