- All Known Subinterfaces:
ComponentComposite
,ComponentComposite.ExtendedComponentComposite<CTX,
,CON> LinkComponent
,LinkComponent.LinkAutomaton
,LinkComponent.LinkComponentBuilder<B>
,Openable.OpenAutomaton
- All Known Implementing Classes:
AbstractComponentComposite
,AbstractComponentComposite.ExtendedCompositeComponentImpl
,AbstractDeviceAutomaton
,LinkAutomatonImpl
public interface Openable
This mixin might be implemented by a component in order to provide opening
connection(s) facilities. The semantics of this interface is very similar to
that of the
Initializable
interface. To clarify the context regarding
connections, the Openable
interface has been introduced.
In case a connection is to be provided to the open()
method, you may
use the ConnectionOpenable
interface with its
ConnectionOpenable.open(Object)
method, which provides an argument
specifying the connection to be passed to the Component
.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
TheOpenable.OpenAutomaton
interface defines those methods related to the opening of connection(s) life-cycle.static interface
Openable.OpenBuilder<B extends Openable.OpenBuilder<B>>
To enable theStartable
functionality to be invoked in a builder chain. -
Method Summary
Modifier and TypeMethodDescriptionvoid
open()
Open the component's connection(s).default void
Opens the component by callingopen()
without you to require catching anIOException
.
-
Method Details
-
open
Open the component's connection(s).- Throws:
IOException
- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
-
openUnchecked
default void openUnchecked()Opens the component by callingopen()
without you to require catching anIOException
.- Throws:
org.refcodes.exception.IORuntimeException
- encapsulates the cause and is thrown upon encountering aIOException
exception
-