- 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
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceTheOpenable.OpenAutomatoninterface defines those methods related to the opening of connection(s) life-cycle.static interfaceOpenable.OpenBuilder<B extends Openable.OpenBuilder<B>>To enable theStartablefunctionality to be invoked in a builder chain. -
Method Summary
Modifier and TypeMethodDescriptionvoidopen()Open the component's connection(s).default voidOpens 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.RuntimeIOException- encapsulates the aCause and is thrown upon encountering aIOExceptionexception
-