Module io.netty5.buffer
Package io.netty5.buffer.api
Interface WritableComponentProcessor<E extends Exception>
-
- All Known Implementing Classes:
IovArray
,RecvFromAddressDomainSocket
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface WritableComponentProcessor<E extends Exception>
A processor of writable components.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
process(int index, WritableComponent component)
Process the given component at the given index in theBuffer.forEachWritable(int, WritableComponentProcessor)
iteration}.
-
-
-
Method Detail
-
process
boolean process(int index, WritableComponent component) throws E extends Exception
Process the given component at the given index in theBuffer.forEachWritable(int, WritableComponentProcessor)
iteration}.The component object itself is only valid during this call, but the
byte buffers
, arrays, and native address pointers obtained from it, will be valid until anyownership
requiring operation is performed on the buffer.- Parameters:
index
- The current index of the given buffer component, based on the initial index passed to theBuffer.forEachWritable(int, WritableComponentProcessor)
method.component
- The current buffer component being processed.- Returns:
true
if the iteration should continue and more components should be processed, otherwisefalse
to stop the iteration early.- Throws:
E extends Exception
-
-