Module org.refcodes.component
Package org.refcodes.component
Interface ClosableHandle.CloseAutomatonHandle<H>
- Type Parameters:
H- The type of the handle.
- All Superinterfaces:
ClosableHandle<H>
- Enclosing interface:
- ClosableHandle<H>
The
ClosableHandle.CloseAutomatonHandle interface defines those methods related
to the handle based close life-cycle. The handle reference requires the
ConnectionOpenable.ConnectionOpenAutomaton interface to be implemented.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.component.ClosableHandle
ClosableHandle.CloseAutomatonHandle<H> -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasCloseAutomaton(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.booleanDetermines 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 Details
-
hasCloseAutomaton
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
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
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.
-