Class BaseResultProducingCloseable<T>

    • Constructor Detail

      • BaseResultProducingCloseable

        public BaseResultProducingCloseable()
    • Method Detail

      • ensureOpen

        protected final void ensureOpen()
      • getResult

        public final T getResult()
        Returns the result.
        Throws:
        IllegalStateException - If this instance has not been closed yet
      • getResultImpl

        protected abstract T getResultImpl()
        Produce the final result.
      • close

        public final void close()
        Close this object. Idempotent.
        Specified by:
        close in interface AutoCloseable
      • closeImpl

        protected void closeImpl()
        Close this closeable as per the contract of Closeable.close(). Called exactly once. By default does nothing.