Top Description Inners Methods
io.netty5.channel

public Interface WriteHandleFactory

Known Direct Implementers
io.netty5.channel.MaxMessagesWriteHandleFactory, io.netty5.channel.ServerChannelWriteHandleFactory

Implementations allow to influence how much data / messages are written per write loop invocation.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
WriteHandleFactory.WriteHandle

Handle which allows to customize how data / messages are read.

Method Summary

Modifier and TypeMethod and Description
public WriteHandleFactory.WriteHandle
newHandle(Channel
the Channel for which the WriteHandle is used.
channel
)

Creates a new handle for the given Channel.

Method Detail

newHandleback to summary
public WriteHandleFactory.WriteHandle newHandle(Channel channel)

Creates a new handle for the given Channel.

Parameters
channel:Channel

the Channel for which the WriteHandle is used.

io.netty5.channel back to summary

public Interface WriteHandleFactory.WriteHandle

Known Direct Implementers
io.netty5.channel.MaxMessagesWriteHandleFactory.MaxMessagesWriteHandle

Handle which allows to customize how data / messages are read.

Method Summary

Modifier and TypeMethod and Description
public default long
estimatedMaxBytesPerGatheringWrite()

Estimate the maximum number of bytes that can be written with one gathering write operation.

public boolean

Returns:

true if the write loop should continue writing, false otherwise.
lastWrite
(long
The number of bytes the write operation did attempt to write.
attemptedBytesWrite
,
long
The number of bytes from the previous write operation. This may be negative if a write error occurs.
actualBytesWrite
,
int
The number of messages written.
numMessagesWrite
)

Notify the WriteHandle of the last write operation and its result.

public void
writeComplete()

Method that must be called once the write loop was completed.

Method Detail

estimatedMaxBytesPerGatheringWriteback to summary
public default long estimatedMaxBytesPerGatheringWrite()

Estimate the maximum number of bytes that can be written with one gathering write operation.

lastWriteback to summary
public boolean lastWrite(long attemptedBytesWrite, long actualBytesWrite, int numMessagesWrite)

Notify the WriteHandle of the last write operation and its result.

Parameters
attemptedBytesWrite:long

The number of bytes the write operation did attempt to write.

actualBytesWrite:long

The number of bytes from the previous write operation. This may be negative if a write error occurs.

numMessagesWrite:int

The number of messages written.

Returns:boolean

true if the write loop should continue writing, false otherwise.

writeCompleteback to summary
public void writeComplete()

Method that must be called once the write loop was completed.