Module org.refcodes.component
Package org.refcodes.component
Interface ConnectionOpenable.ConnectionOpenAutomaton<CON>
- Type Parameters:
CON
- The type of the connection to be used.
- All Superinterfaces:
ConnectionOpenable<CON>
,OpenedAccessor
- All Known Subinterfaces:
ConnectionComponent.ConnectionAutomaton<CON>
- All Known Implementing Classes:
ConnectionAutomatonImpl
- Enclosing interface:
- ConnectionOpenable<CON>
public static interface ConnectionOpenable.ConnectionOpenAutomaton<CON>
extends ConnectionOpenable<CON>, OpenedAccessor
The
ConnectionOpenable.ConnectionOpenAutomaton
interface defines those methods
related to the opening of connection(s) life-cycle. The semantics of this
interface is very similar to that of the Configurable.ConfigureAutomaton
interface. To clarify the context regarding connections, the
ConnectionOpenable.ConnectionOpenAutomaton
interface has been introduced.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.component.ConnectionOpenable
ConnectionOpenable.ConnectionOpenAutomaton<CON>, ConnectionOpenable.ConnectionOpenBuilder<CON,
B extends ConnectionOpenable.ConnectionOpenBuilder<CON, B>> Nested classes/interfaces inherited from interface org.refcodes.component.OpenedAccessor
OpenedAccessor.OpenedMutator, OpenedAccessor.OpenedProperty
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isOpenable
(CON aConnection) Determines whether the given connection may get opened, if true then component may open a connection with the given connection via theConnectionOpenable.open(Object)
method.Methods inherited from interface org.refcodes.component.ConnectionOpenable
open, openUnchecked
Methods inherited from interface org.refcodes.component.OpenedAccessor
isOpened
-
Method Details
-
isOpenable
Determines whether the given connection may get opened, if true then component may open a connection with the given connection via theConnectionOpenable.open(Object)
method. Usually no physical connection is established; usually criteria describing the provided connection are evaluated; for example the connection is tested against a black list, a white list or against well-formedness or whether the specified protocols are supported (in case of a connection being a String URL beginning with "http://", "ftp://" or similar). --------------------------------------------------------------------- CAUTION: Even in case true is returned, the actual opening of a connection may fail (e.g. due to network failure or authentication issues). ---------------------------------------------------------------------- Parameters:
aConnection
- The connection for which to determine whether it can be used to open a connection.- Returns:
- True if
ConnectionOpenable.open(Object)
is theoretically possible.
-