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 OpenableThis 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 theInitializableinterface. To clarify the context regarding connections, theOpenableinterface has been introduced.In case a connection is to be provided to the
open()method, you may use theConnectionOpenableinterface 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 interfaceOpenable.OpenAutomatonTheOpenable.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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidopen()Open the component's connection(s).default voidopenUnchecked()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 aOpenExceptionexception
-
-