org.duh.resource

AutoResource

abstract class AutoResource[T] extends ManagedResource[T]

The backing implementation of a managed resource. For a full explanation of how this is commonly extended, see the ManagedResource documentation.

T

type of the contained resource

Linear Supertypes
ManagedResource[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. AutoResource
  2. ManagedResource
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AutoResource(value: T)

    value

    the resource value being manage

Abstract Value Members

  1. abstract def close(value: T): Unit

    Dispose of the resource represented by value.

    Dispose of the resource represented by value. This method must be implemented by all concrete subclasses.

    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. final def auto: AutoResource[T]

    Allow for one class to provide both the AutoResource and the ManagedResource.

    Allow for one class to provide both the AutoResource and the ManagedResource. See the documentation for ManagedResource for more information.

    returns

    this object

    Definition Classes
    AutoResourceManagedResource
    Annotations
    @inline()
  6. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def flatMap[B](f: (T) ⇒ B): B

    Function implementing second-level depth of a for-comprehension.

    Function implementing second-level depth of a for-comprehension. Since this is only handling the resource disposal as a side effect, this is identical to map() and simply passes through the value returned by the function f.

    Annotations
    @inline()
  11. final def foreach[U](f: (T) ⇒ U): Unit

    Function implementing no-yield code handling in a for-comprehension.

    Function implementing no-yield code handling in a for-comprehension. This simply defers to map() and discards any value returned.

    Annotations
    @inline()
  12. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  15. final def map[B](f: (T) ⇒ B): B

    The actual logic handling code wrapped by resource management, and the function implementing first-level depth of a for-comprehension.

    The actual logic handling code wrapped by resource management, and the function implementing first-level depth of a for-comprehension. Since this is only handling the resource disposal as a side effect, the return value is not actually a transformation of T in the normal sense. Rather, the return value of the function f is returned as-is, and is opaque to the code in map().

    If the function f throws an exception, it will propagate up the stack as normal, but the close() call will still take place.

    After executing the function f, but before returning its return value, this calls close(). If an exception which qualifies as NonFatal is thrown during the call to close(), the exception handler registered with AutoResource.exceptionHandler is called (it defaults to discarding the exception).

    B

    return type of the function f

    f

    function (code block) to execute

    returns

    the value returned by the function f

    Annotations
    @noinline()
  16. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  20. def toString(): String

    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ManagedResource[T]

Inherited from AnyRef

Inherited from Any

Ungrouped