Package org.refcodes.component
Interface DisposableHandle.DisposeAutomatonHandle<H>
-
- Type Parameters:
H
- The type of the handle.
- All Superinterfaces:
DisposableHandle<H>
- Enclosing interface:
- DisposableHandle<H>
public static interface DisposableHandle.DisposeAutomatonHandle<H> extends DisposableHandle<H>
TheDisposableHandle.DisposeAutomatonHandle
interface defines those methods related to the handle based dispose life-cycle. The handle reference requires theDisposeAutomaton
interface to be implemented.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.component.DisposableHandle
DisposableHandle.DisposeAutomatonHandle<H>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
hasDisposeAutomaton(H aHandle)
Determines whether the handle reference is disposable by implementing theDisposeAutomaton
interface.boolean
isDisposable(H aHandle)
Determines whether the component identified by the given handle may get disposed.boolean
isDisposed(H aHandle)
Determines whether the component identified by the given handle is disposed.-
Methods inherited from interface org.refcodes.component.DisposableHandle
dispose, hasDisposable
-
-
-
-
Method Detail
-
hasDisposeAutomaton
boolean hasDisposeAutomaton(H aHandle) throws UnknownHandleRuntimeException
Determines whether the handle reference is disposable by implementing theDisposeAutomaton
interface.- Parameters:
aHandle
- The handle to test whether the reference provides the according functionality.- Returns:
- True in case the reference provides the according functionality.
- Throws:
UnknownHandleRuntimeException
- in case the handle is unknown.
-
isDisposable
boolean isDisposable(H aHandle) throws UnknownHandleRuntimeException, UnsupportedHandleOperationRuntimeException
Determines whether the component identified by the given handle may get disposed.- Parameters:
aHandle
- The handle identifying the component.- Returns:
- True if
DisposableHandle.dispose(Object)
is possible. - Throws:
UnknownHandleRuntimeException
- in case the given handle is unknown.UnsupportedHandleOperationRuntimeException
- in case the reference of the handle does not support the requested operation.
-
isDisposed
boolean isDisposed(H aHandle) throws UnknownHandleRuntimeException, UnsupportedHandleOperationRuntimeException
Determines whether the component identified by the given handle is disposed.- Parameters:
aHandle
- The handle identifying the component.- Returns:
- True in case of being disposed, else false.
- Throws:
UnknownHandleRuntimeException
- in case the given handle is unknown.UnsupportedHandleOperationRuntimeException
- in case the reference of the handle does not support the requested operation.
-
-