Package org.refcodes.component
Interface ClosableHandle.CloseAutomatonHandle<H>
-
- Type Parameters:
H- The type of the handle.
- All Superinterfaces:
ClosableHandle<H>
- Enclosing interface:
- ClosableHandle<H>
public static interface ClosableHandle.CloseAutomatonHandle<H> extends ClosableHandle<H>
TheClosableHandle.CloseAutomatonHandleinterface defines those methods related to the handle based close life-cycle. The handle reference requires theConnectionOpenable.ConnectionOpenAutomatoninterface to be implemented.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.component.ClosableHandle
ClosableHandle.CloseAutomatonHandle<H>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanhasCloseAutomaton(H aHandle)Determines whether the handle reference is closable by implementing theConnectionOpenable.ConnectionOpenAutomatoninterface.booleanisClosable(H aHandle)Determines whether the component identified by the given handle may get closed/disconnected.booleanisClosed(H aHandle)Determines whether the component (its connection) identified by the given handle is closed (disconnected).-
Methods inherited from interface org.refcodes.component.ClosableHandle
close, closeUnchecked, hasClosable
-
-
-
-
Method Detail
-
hasCloseAutomaton
boolean hasCloseAutomaton(H aHandle) throws UnknownHandleRuntimeException
Determines whether the handle reference is closable by implementing theConnectionOpenable.ConnectionOpenAutomatoninterface.- 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.
-
isClosable
boolean isClosable(H aHandle) throws UnknownHandleRuntimeException, UnsupportedHandleOperationRuntimeException
Determines whether the component identified by the given handle may get closed/disconnected.- Parameters:
aHandle- The handle identifying the component.- Returns:
- True if
ClosableHandle.close(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.
-
isClosed
boolean isClosed(H aHandle) throws UnknownHandleRuntimeException, UnsupportedHandleOperationRuntimeException
Determines whether the component (its connection) identified by the given handle is closed (disconnected).- Parameters:
aHandle- The handle identifying the component.- Returns:
- True in case of being closed, 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.
-
-