Class AbstractAsyncCloseable

    • Field Detail

      • eventloop

        protected final Eventloop eventloop
    • Constructor Detail

      • AbstractAsyncCloseable

        public AbstractAsyncCloseable()
    • Method Detail

      • getException

        public Throwable getException()
      • setCloseable

        public final void setCloseable​(@Nullable
                                       @Nullable AsyncCloseable closeable)
      • onClosed

        protected void onClosed​(@NotNull
                                @NotNull Throwable e)
      • onCleanup

        protected void onCleanup()
      • closeEx

        public final void closeEx​(@NotNull
                                  @NotNull Throwable e)
        Description copied from interface: AsyncCloseable
        Closes process exceptionally in case an exception is thrown while executing the given process.
        Specified by:
        closeEx in interface AsyncCloseable
        Parameters:
        e - exception that is used to close process with
      • isClosed

        public final boolean isClosed()
      • sanitize

        @NotNull
        public final <T> @NotNull Promise<T> sanitize​(Promise<T> promise)
      • sanitize

        @NotNull
        public final <T> @NotNull Promise<T> sanitize​(T value,
                                                      @Nullable
                                                      @Nullable Throwable e)