Package de.esoco.coroutine.step.nio
Interface AsynchronousChannelStep.ChannelOperation<C extends java.nio.channels.AsynchronousChannel>
-
- Enclosing class:
- AsynchronousChannelStep<I,O>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface protected static interface AsynchronousChannelStep.ChannelOperation<C extends java.nio.channels.AsynchronousChannel>A functional interface used as argument toAsynchronousChannelStep.ChannelCallback.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanexecute(int bytesProcessed, C channel, java.nio.ByteBuffer data, AsynchronousChannelStep.ChannelCallback<java.lang.Integer,C> callback)Performs an asnychronous channel operation if necessary or returns FALSE.
-
-
-
Method Detail
-
execute
boolean execute(int bytesProcessed, C channel, java.nio.ByteBuffer data, AsynchronousChannelStep.ChannelCallback<java.lang.Integer,C> callback) throws java.lang.ExceptionPerforms an asnychronous channel operation if necessary or returns FALSE.- Parameters:
bytesProcessed- The number of bytes that have been processed by a previous invocationchannel- The channel to perform the operation ondata- The byte buffer for the operation datacallback- The callback to be invoked (recursively) upon completion of the operation- Returns:
- FALSE if a recursive asynchronous execution has been started, TRUE if the operation is complete
- Throws:
java.lang.Exception- Any kind of exception may be thrown
-
-