Interface ConnectionOpenable.ConnectionOpenBuilder<CON,B extends ConnectionOpenable.ConnectionOpenBuilder<CON,B>>

Type Parameters:
CON - the generic type
B - The instance to be returned on which to apply succeeding builder operations.
All Known Subinterfaces:
ConnectionComponent.ConnectionComponentBuilder<CON,B>
Enclosing interface:
ConnectionOpenable<CON>

public static interface ConnectionOpenable.ConnectionOpenBuilder<CON,B extends ConnectionOpenable.ConnectionOpenBuilder<CON,B>>
To enable the Startable functionality to be invoked in a builder chain.
  • Method Details

    • withOpen

      B withOpen(CON aConnection) throws IOException
      Builder method for the ConnectionOpenable.open(Object) method.
      Parameters:
      aConnection - The connection used for opening the connection.
      Returns:
      The instance to be returned on which to apply succeeding builder operations.
      Throws:
      IOException - Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
    • withOpenUnchecked

      default B withOpenUnchecked(CON aConnection)
      Opens the component by calling withOpen(Object) without you to require catching an IOException.
      Parameters:
      aConnection - The connection used for opening the connection.
      Returns:
      The instance to be returned on which to apply succeeding builder operations.
      Throws:
      org.refcodes.exception.IORuntimeException - encapsulates the cause and is thrown upon encountering a IOException exception