Top Description Constructors Methods
io.netty5.channel

public Class DefaultBufferAddressedEnvelope<A extends java.net.SocketAddress>

extends BufferAddressedEnvelope<A extends SocketAddress, DefaultBufferAddressedEnvelope<A extends SocketAddress>>
Class Inheritance
Type Parameters
<A>
the type of the recipient and sender addresses.
Imports
io.netty5.buffer.Buffer, java.net.SocketAddress

The default AddressedEnvelope implementation for Buffer messages.

Constructor Summary

AccessConstructor and Description
public
DefaultBufferAddressedEnvelope(Buffer message, A recipient, A sender)

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

public
DefaultBufferAddressedEnvelope(Buffer message, A recipient)

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

Method Summary

Modifier and TypeMethod and Description
public DefaultBufferAddressedEnvelope<A>
replace(Buffer
The contents of the returned addressed envelope instance.
content
)

Implements abstract io.netty5.channel.BufferAddressedEnvelope.replace.

Create a new addressed envelope instance, that has the same recipient and sender as this one, but the given content.
public DefaultBufferAddressedEnvelope<A>
touch(Object
An optional hint about this access and its context. May be null.
hint
)

Overrides default io.netty5.util.Resource.touch.

Record the current access location for debugging purposes.
Inherited from io.netty5.channel.BufferAddressedEnvelope:
closeisAccessiblesend

Constructor Detail

DefaultBufferAddressedEnvelopeback to summary
public DefaultBufferAddressedEnvelope(Buffer message, A recipient, A sender)

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

DefaultBufferAddressedEnvelopeback to summary
public DefaultBufferAddressedEnvelope(Buffer message, A recipient)

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

Method Detail

replaceback to summary
public DefaultBufferAddressedEnvelope<A> replace(Buffer content)

Implements abstract io.netty5.channel.BufferAddressedEnvelope.replace.

Doc from io.netty5.channel.BufferAddressedEnvelope.replace.

Create a new addressed envelope instance, that has the same recipient and sender as this one, but the given content.

Parameters
content:Buffer

The contents of the returned addressed envelope instance.

Returns:DefaultBufferAddressedEnvelope<A>

An addressed envelope instance that has the same recipient and sender as this one, but the given content.

Annotations
@Override
touchback to summary
public DefaultBufferAddressedEnvelope<A> touch(Object hint)

Overrides default io.netty5.util.Resource.touch.

Doc from io.netty5.util.Resource.touch.

Record 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:Object

An optional hint about this access and its context. May be null.

Returns:DefaultBufferAddressedEnvelope<A>

This resource instance.

Annotations
@Override