- Type Parameters:
CON
- The type of the connection to be used.
- All Known Subinterfaces:
ComponentComposite.ExtendedComponentComposite<CTX,
,CON> ConnectionComponent<CON>
,ConnectionComponent.ConnectionAutomaton<CON>
,ConnectionComponent.ConnectionComponentBuilder<CON,
,B> ConnectionOpenable.ConnectionOpenAutomaton<CON>
- All Known Implementing Classes:
AbstractComponentComposite.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 the
Configurable
interface. To clarify the context regarding
connections, the ConnectionOpenable
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 the
Openable
interface with its Openable.open()
method, which
does not require any arguments specifying a connection.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
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
Modifier and TypeMethodDescriptionvoid
Opens the component with the given connection.default void
openUnchecked
(CON aConnection) Opens the component by callingopen(Object)
without you to require catching anIOException
.
-
Method Details
-
open
Opens the component with the given connection.- Parameters:
aConnection
- The connection used for opening the connection.- Throws:
IOException
- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
-
openUnchecked
Opens the component by callingopen(Object)
without you to require catching anIOException
.- Parameters:
aConnection
- The connection used for opening the connection.- Throws:
org.refcodes.exception.RuntimeIOException
- encapsulates the aCause and is thrown upon encountering aIOException
exception
-