Package org.refcodes.component
Interface ConnectionOpenable<CON>
-
- Type Parameters:
CON
- The type of the connection to be used.
- All Known Subinterfaces:
CompositeComponent.ExtendedCompositeComponent<CTX,CON>
,ConnectionComponent<CON>
,ConnectionComponent.ConnectionAutomaton<CON>
,ConnectionComponent.ConnectionComponentBuilder<CON,B>
,ConnectionOpenable.ConnectionOpenAutomaton<CON>
- All Known Implementing Classes:
CompositeComponentImpl.ExtendedCompositeComponentImpl
,ConnectionAutomatonImpl
public interface ConnectionOpenable<CON>
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 theConfigurable
interface. To clarify the context regarding connections, theConnectionOpenable
interface has been introduced.In case a no connection is to be provided to the
open(Object)
method (as it may have been passed via the constructor), you may use theOpenable
interface with itsOpenable.open()
method, which does not require any arguments specifying a connection.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ConnectionOpenable.ConnectionOpenAutomaton<CON>
TheConnectionOpenable.ConnectionOpenAutomaton
interface defines those methods related to the opening of connection(s) life-cycle.static interface
ConnectionOpenable.ConnectionOpenBuilder<CON,B extends ConnectionOpenable.ConnectionOpenBuilder<CON,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(CON aConnection)
Opens the component with the given connection.default void
openUnchecked(CON aConnection)
Opens the component by callingopen(Object)
without you to require catching anOpenException
.
-
-
-
Method Detail
-
open
void open(CON aConnection) throws OpenException
Opens the component with the given connection.- Parameters:
aConnection
- The connection used for opening the connection.- Throws:
OpenException
- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
-
openUnchecked
default void openUnchecked(CON aConnection)
Opens the component by callingopen(Object)
without you to require catching anOpenException
.- Parameters:
aConnection
- The connection used for opening the connection.- Throws:
org.refcodes.exception.HiddenException
- encapsulates the cause and is thrown upon encountering aOpenException
exception
-
-