Package org.refcodes.component
Interface Openable
-
- All Known Subinterfaces:
CompositeComponent
,CompositeComponent.ExtendedCompositeComponent<CTX,CON>
,LinkComponent
,LinkComponent.LinkAutomaton
,LinkComponent.LinkComponentBuilder<B>
,Openable.OpenAutomaton
- All Known Implementing Classes:
AbstractDeviceAutomaton
,CompositeComponentImpl
,CompositeComponentImpl.ExtendedCompositeComponentImpl
,DeviceAutomatonImpl
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 theInitializable
interface. To clarify the context regarding connections, theOpenable
interface has been introduced.In case a connection is to be provided to the
open()
method, you may use theConnectionOpenable
interface with itsConnectionOpenable.open(Object)
method, which provides an argument specifying the connection to be passed to theComponent
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Openable.OpenAutomaton
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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
open()
Open the component's connection(s).default void
openUnchecked()
Opens the component by callingopen()
without you to require catching anOpenException
.
-
-
-
Method Detail
-
open
void open() throws OpenException
Open the component's connection(s).- Throws:
OpenException
- 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 anOpenException
.- Throws:
OpenException.OpenRuntimeException
- encapsulates the cause and is thrown upon encountering aOpenException
exception
-
-