Class Opener

java.lang.Object
org.pipservices3.commons.run.Opener

public class Opener extends Object
Helper class that opens components.
See Also:
  • Constructor Details

    • Opener

      public Opener()
  • Method Details

    • isOpenOne

      public static boolean isOpenOne(Object component)
      Checks if specified component is opened.

      To be checked components must implement IOpenable interface. If they don't the call to this method returns true.

      Parameters:
      component - the component that is to be checked.
      Returns:
      true if component is opened and false otherwise.
      See Also:
    • isOpen

      public static boolean isOpen(Iterable<Object> components)
      Checks if all components are opened.

      To be checked components must implement IOpenable interface. If they don't the call to this method returns true.

      Parameters:
      components - a list of components that are to be checked.
      Returns:
      true if all components are opened and false if at least one component is closed.
      See Also:
    • openOne

      public static void openOne(String correlationId, Object component) throws ApplicationException
      Opens specific component.

      To be opened components must implement IOpenable interface. If they don't the call to this method has no effect.

      Parameters:
      correlationId - (optional) transaction id to trace execution through call chain.
      component - the component that is to be opened.
      Throws:
      ApplicationException - when error or null no errors occured.
      See Also:
    • open

      public static void open(String correlationId, Iterable<Object> components) throws ApplicationException
      Opens multiple components.

      To be opened components must implement IOpenable interface. If they don't the call to this method has no effect.

      Parameters:
      correlationId - (optional) transaction id to trace execution through call chain.
      components - the list of components that are to be closed.
      Throws:
      ApplicationException - when error or null no errors occured.
      See Also: