-
- All Known Subinterfaces:
Disposable.Disposedable
public interface Disposable
Any type not being a mature component, which nevertheless can be destroyed, implements thisDisposable
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 theorg.refcodes.component.Component
interface with itsorg.refcodes.component.Destroyable#destroy()
method.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Disposable.Disposedable
TheDisposable.Disposedable
interface defines those methods related to the dispose life-cycle as well as evaluating the disposed status withDisposedAccessor.isDisposed()
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
dispose()
Disposes the implementing class's instance.
-
-
-
Method Detail
-
dispose
void dispose()
Disposes the implementing class's instance. The methodDisposedAccessor.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 has to take care of it.
-
-