Interface Openable

All Known Subinterfaces:
ComponentComposite, ComponentComposite.ExtendedComponentComposite<CTX,CON>, LinkComponent, LinkComponent.LinkAutomaton, LinkComponent.LinkComponentBuilder<B>, Openable.OpenAutomaton
All Known Implementing Classes:
AbstractComponentComposite, AbstractComponentComposite.ExtendedCompositeComponentImpl, AbstractDeviceAutomaton, LinkAutomatonImpl

public interface Openable
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 Initializable interface. To clarify the context regarding connections, the Openable interface has been introduced.

In case a connection is to be provided to the open() method, you may use the ConnectionOpenable interface with its ConnectionOpenable.open(Object) method, which provides an argument specifying the connection to be passed to the Component.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    The Openable.OpenAutomaton interface defines those methods related to the opening of connection(s) life-cycle.
    static interface 
    To enable the Startable functionality to be invoked in a builder chain.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Open the component's connection(s).
    default void
    Opens the component by calling open() without you to require catching an IOException.
  • Method Details

    • open

      void open() throws IOException
      Open the component's connection(s).
      Throws:
      IOException - Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
    • openUnchecked

      default void openUnchecked()
      Opens the component by calling open() without you to require catching an IOException.
      Throws:
      org.refcodes.exception.RuntimeIOException - encapsulates the aCause and is thrown upon encountering a IOException exception