public interface Disposable
Disposable
interface. This avoids the necessity to
depend on the refcodes-component artifact. In addition the semantic
distinction between a component in terms of refcodes-component and a plain
old java class or bean is clear.
ATTENTION: In case you intend to add support dispose()
functionality
to your mature components (in terms of refcodes-component), please implement
the org.refcodes.component.Component
interface with its
org.refcodes.component.Destroyable#destroy()
method.
Modifier and Type | Interface and Description |
---|---|
static interface |
Disposable.DisposeSupport
The
Disposable.DisposeSupport interface defines those methods related to the
dispose life-cycle as well as evaluating the disposed status with
DisposedAccessor.isDisposed() . |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes the implementing class's instance.
|
void dispose()
#isDisposed()
must then return true.
Forces an object to be disposed. The programmer implementing this method
has to take care that all objects are to be released which are referenced
by the object implementing this interface and the
GenericDisposeabelPublic interface. All references are to be set to a
null pointer in order for the garbage collector to work more effectively.
If this method has been called than the method isDisposed() in the
interface GenericDisposeablePublic has to return true. If dispose() has
been called, than ALL OTHER methods in the class implementing this
interface and the corresponding interface GenericDisposeablePublic except
the isDispoed() and the dispose() methods have to throw a
DisposedPredictableException - the programmer implementing the interface
s has to take care of it.Copyright © 2015. All rights reserved.