Interface HandleConsumer<X extends Exception>

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 HandleConsumer<X extends Exception>
Callback that accepts a Handle and returns no result. The provided Handle may not remain valid past return from the consumer.
  • Method Summary

    Modifier and Type
    useHandle(Handle handle)
    Will be invoked with an open Handle.
  • Method Details

    • useHandle

      void useHandle(Handle handle) throws X
      Will be invoked with an open Handle. The handle may be closed when this callback returns.
      handle - Handle to be used only within scope of this callback
      X - optional exception thrown by the callback
    • asCallback

      default HandleCallback<Void,X> asCallback()