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 to AsynchronousChannelStep.ChannelCallback.
    • Method Detail

      • execute

        boolean execute​(int bytesProcessed,
                        C channel,
                        java.nio.ByteBuffer data,
                        AsynchronousChannelStep.ChannelCallback<java.lang.Integer,​C> callback)
                 throws java.lang.Exception
        Performs an asnychronous channel operation if necessary or returns FALSE.
        Parameters:
        bytesProcessed - The number of bytes that have been processed by a previous invocation
        channel - The channel to perform the operation on
        data - The byte buffer for the operation data
        callback - 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