Class ComponentUtility

java.lang.Object
org.refcodes.component.ComponentUtility

public final class ComponentUtility extends Object
The Class ComponentUtility.
  • Method Details

    • initialize

      public static void initialize(Object aComponent) throws InitializeException
      Helper method, initializes the given Component in case it is Initializable.
      Parameters:
      aComponent - The Component to initialize.
      Throws:
      InitializeException - Thrown in case initialization failed.
    • initialize

      public static void initialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) throws InitializeException
      Helper method for initializing all Initializable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when initializing the Component instances.
      aComponents - The Collection containing the Component instances to initialize (in case them implement the Initializable interface).
      Throws:
      InitializeException - in case initialization of at least one Initializable instance failed.
    • initialize

      public static void initialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) throws InitializeException
      Helper method for initializing all Initializable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when initializing the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
      Throws:
      InitializeException - in case initialization of at least one Initializable instance failed.
    • initialize

      @SafeVarargs public static void initialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) throws InitializeException
      Helper method for initializing all Initializable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when initializing the Component instances.
      aComponents - The Collection containing the Component instances to initialize (in case them implement the Initializable interface).
      Throws:
      InitializeException - in case initialization of at least one Initializable instance failed.
    • initialize

      @SafeVarargs public static void initialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) throws InitializeException
      Helper method for initializing all Initializable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when initializing the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
      Throws:
      InitializeException - in case initialization of at least one Initializable instance failed.
    • initialize

      public static <CTX> void initialize(Object aComponent, CTX aContext) throws InitializeException
      Helper method, configuring the given Component in case it is Configurable.
      Type Parameters:
      CTX - the generic type
      Parameters:
      aComponent - The Component to configure.
      aContext - the context
      Throws:
      ConfigureException - the configure exception
      InitializeException
    • initialize

      public static <CTX> void initialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CTX aContext, Collection<?> aComponents) throws ConfigureException
      Helper method for configuring all Configurable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Type Parameters:
      CTX - the generic type
      Parameters:
      aComponentExecutionStrategy - The strategy to use when initializing the Component instances.
      aContext - the context
      aComponents - The Collection containing the Component instances to initialize (in case them implement the Configurable interface).
      Throws:
      ConfigureException - the configure exception
    • initialize

      public static <CTX> void initialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, CTX aContext, Collection<?> aComponents) throws ConfigureException
      Helper method for configuring all Configurable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Type Parameters:
      CTX - the generic type
      Parameters:
      aComponentExecutionStrategy - The strategy to use when initializing the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aContext - the context
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
      Throws:
      ConfigureException - the configure exception
    • initialize

      @SafeVarargs public static <CTX> void initialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CTX aContext, Object... aComponents) throws ConfigureException
      Helper method for configuring all ConfigureException Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Type Parameters:
      CTX - the generic type
      Parameters:
      aComponentExecutionStrategy - The strategy to use when initializing the Component instances.
      aContext - the context
      aComponents - The Collection containing the Component instances to initialize (in case them implement the ConfigureException interface).
      Throws:
      ConfigureException - the configure exception
    • initialize

      @SafeVarargs public static <CTX> void initialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, CTX aContext, Object... aComponents) throws ConfigureException
      Helper method for configuring all ConfigureException Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Type Parameters:
      CTX - the generic type
      Parameters:
      aComponentExecutionStrategy - The strategy to use when initializing the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aContext - the context
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
      Throws:
      ConfigureException - the configure exception
    • start

      public static void start(Object aComponent) throws StartException
      Helper method, starts the given Component in case it is Startable.
      Parameters:
      aComponent - The Component to start.
      Throws:
      StartException - Thrown in case initialization failed.
    • start

      public static void start(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) throws StartException
      Helper method for starting all Startable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when starting the Component instances.
      aComponents - The Collection containing the Component instances to start (in case them implement the Startable interface).
      Throws:
      StartException - in case initialization of at least one Startable instance failed.
    • start

      public static void start(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) throws StartException
      Helper method for starting all Startable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when starting the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
      Throws:
      StartException - in case initialization of at least one Startable instance failed.
    • start

      @SafeVarargs public static void start(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) throws StartException
      Helper method for starting all Startable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when starting the Component instances.
      aComponents - The Collection containing the Component instances to start (in case them implement the Startable interface).
      Throws:
      StartException - in case initialization of at least one Startable instance failed.
    • start

      @SafeVarargs public static void start(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) throws StartException
      Helper method for starting all Startable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when starting the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
      Throws:
      StartException - in case initialization of at least one Startable instance failed.
    • pause

      public static void pause(Object aComponent) throws PauseException
      Helper method, pauses the given Component in case it is Pausable.
      Parameters:
      aComponent - The Component to pause.
      Throws:
      PauseException - Thrown in case initialization failed.
    • pause

      public static void pause(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) throws PauseException
      Helper method for pausing all Pausable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when pausing the Component instances.
      aComponents - The Collection containing the Component instances to pause (in case them implement the Pausable interface).
      Throws:
      PauseException - in case initialization of at least one Pausable instance failed.
    • pause

      public static void pause(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) throws PauseException
      Helper method for pausing all Pausable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when pausing the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
      Throws:
      PauseException - in case initialization of at least one Pausable instance failed.
    • pause

      @SafeVarargs public static void pause(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) throws PauseException
      Helper method for pausing all Pausable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when pausing the Component instances.
      aComponents - The Collection containing the Component instances to pause (in case them implement the Pausable interface).
      Throws:
      PauseException - in case initialization of at least one Pausable instance failed.
    • pause

      @SafeVarargs public static void pause(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) throws PauseException
      Helper method for pausing all Pausable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when pausing the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
      Throws:
      PauseException - in case initialization of at least one Pausable instance failed.
    • resume

      public static void resume(Object aComponent) throws ResumeException
      Helper method, resumes the given Component in case it is Resumable.
      Parameters:
      aComponent - The Component to resume.
      Throws:
      ResumeException - Thrown in case initialization failed.
    • resume

      public static void resume(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) throws ResumeException
      Helper method for resuming all Resumable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when resuming the Component instances.
      aComponents - The Collection containing the Component instances to resume (in case them implement the Resumable interface).
      Throws:
      ResumeException - in case initialization of at least one Resumable instance failed.
    • resume

      public static void resume(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) throws ResumeException
      Helper method for resuming all Resumable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when resuming the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
      Throws:
      ResumeException - in case initialization of at least one Resumable instance failed.
    • resume

      @SafeVarargs public static void resume(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) throws ResumeException
      Helper method for resuming all Resumable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when resuming the Component instances.
      aComponents - The Collection containing the Component instances to resume (in case them implement the Resumable interface).
      Throws:
      ResumeException - in case initialization of at least one Resumable instance failed.
    • resume

      @SafeVarargs public static void resume(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) throws ResumeException
      Helper method for resuming all Resumable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when resuming the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
      Throws:
      ResumeException - in case initialization of at least one Resumable instance failed.
    • stop

      public static void stop(Object aComponent) throws StopException
      Helper method, stops the given Component in case it is Stoppable.
      Parameters:
      aComponent - The Component to stop.
      Throws:
      StopException - Thrown in case initialization failed.
    • stop

      public static void stop(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) throws StopException
      Helper method for stopping all Stoppable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when stoping the Component instances.
      aComponents - The Collection containing the Component instances to stop (in case them implement the Stoppable interface).
      Throws:
      StopException - in case initialization of at least one Stoppable instance failed.
    • stop

      public static void stop(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) throws StopException
      Helper method for stopping all Stoppable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when stoping the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
      Throws:
      StopException - in case initialization of at least one Stoppable instance failed.
    • stop

      @SafeVarargs public static void stop(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) throws StopException
      Helper method for stoping all Stoppable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when stoping the Component instances.
      aComponents - The Collection containing the Component instances to stop (in case them implement the Stoppable interface).
      Throws:
      StopException - in case initialization of at least one Stoppable instance failed.
    • stop

      @SafeVarargs public static void stop(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) throws StopException
      Helper method for stoping all Stoppable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when stoping the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
      Throws:
      StopException - in case initialization of at least one Stoppable instance failed.
    • destroy

      public static void destroy(Object aComponent)
      Helper method, destroys the given Component in case it is Destroyable.
      Parameters:
      aComponent - The Component to destroy.
    • destroy

      public static void destroy(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents)
      Helper method for destroying all Destroyable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when destroying the Component instances.
      aComponents - The Collection containing the Component instances to destroy (in case them implement the Destroyable interface).
    • destroy

      public static void destroy(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents)
      Helper method for destroying all Destroyable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when destroying the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
    • destroy

      @SafeVarargs public static void destroy(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents)
      Helper method for destroying all Destroyable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when destroying the Component instances.
      aComponents - The Collection containing the Component instances to destroy (in case them implement the Destroyable interface).
    • destroy

      @SafeVarargs public static void destroy(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents)
      Helper method for destroying all Destroyable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when destroying the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
    • decompose

      public static void decompose(Object aComponent)
      Helper method, decomposes the given Component in case it is Decomposeable.
      Parameters:
      aComponent - The Component to decompose.
    • decompose

      public static void decompose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents)
      Helper method for decomposing all Decomposeable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when decomposing the Component instances.
      aComponents - The Collection containing the Component instances to decompose (in case them implement the Decomposeable interface).
    • decompose

      public static void decompose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents)
      Helper method for decomposing all Decomposeable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when decomposing the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
    • decompose

      @SafeVarargs public static void decompose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents)
      Helper method for decomposing all Decomposeable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when decomposing the Component instances.
      aComponents - The Collection containing the Component instances to decompose (in case them implement the Decomposeable interface).
    • decompose

      @SafeVarargs public static void decompose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents)
      Helper method for decomposing all Decomposeable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when decomposing the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
    • dispose

      public static void dispose(Object aComponent)
      Helper method, disposes the given Component in case it is Disposable.
      Parameters:
      aComponent - The Component to dispose.
    • dispose

      public static void dispose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents)
      Helper method for decomposing all Disposable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when decomposing the Component instances.
      aComponents - The Collection containing the Component instances to dispose (in case them implement the Disposable interface).
    • dispose

      public static void dispose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents)
      Helper method for decomposing all Disposable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when decomposing the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
    • dispose

      @SafeVarargs public static void dispose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents)
      Helper method for decomposing all Disposable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when decomposing the Component instances.
      aComponents - The Collection containing the Component instances to dispose (in case them implement the Disposable interface).
    • dispose

      @SafeVarargs public static void dispose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents)
      Helper method for decomposing all Disposable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when decomposing the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
    • flush

      public static void flush(Object aComponent) throws IOException
      Helper method, flushs the given Component in case it is Flushable.
      Parameters:
      aComponent - The Component to flush.
      Throws:
      IOException - Thrown in case initialization failed.
    • flush

      public static void flush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) throws IOException
      Helper method for flushing all Flushable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when flushing the Component instances.
      aComponents - The Collection containing the Component instances to flush (in case them implement the Flushable interface).
      Throws:
      IOException - in case initialization of at least one Flushable instance failed.
    • flush

      public static void flush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) throws IOException
      Helper method for flushing all Flushable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when flushing the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
      Throws:
      IOException - in case initialization of at least one Flushable instance failed.
    • flush

      @SafeVarargs public static void flush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) throws IOException
      Helper method for flushing all Flushable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when flushing the Component instances.
      aComponents - The Collection containing the Component instances to flush (in case them implement the Flushable interface).
      Throws:
      IOException - in case initialization of at least one Flushable instance failed.
    • flush

      @SafeVarargs public static void flush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) throws IOException
      Helper method for flushing all Flushable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when flushing the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
      Throws:
      IOException - in case initialization of at least one Flushable instance failed.
    • reset

      public static void reset(Object aComponent)
      Helper method, resets the given Component in case it is Resetable.
      Parameters:
      aComponent - The Component to reset.
    • reset

      public static void reset(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents)
      Helper method for decomposing all Resetable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when decomposing the Component instances.
      aComponents - The Collection containing the Component instances to reset (in case them implement the Resetable interface).
    • reset

      public static void reset(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents)
      Helper method for decomposing all Resetable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when decomposing the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
    • reset

      @SafeVarargs public static void reset(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents)
      Helper method for decomposing all Resetable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when decomposing the Component instances.
      aComponents - The Collection containing the Component instances to reset (in case them implement the Resetable interface).
    • reset

      @SafeVarargs public static void reset(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents)
      Helper method for decomposing all Resetable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when decomposing the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
    • open

      public static void open(Object aComponent) throws IOException
      Helper method, opens the given Component in case it is Openable.
      Parameters:
      aComponent - The Component to open.
      Throws:
      IOException - Thrown in case initialization failed.
    • open

      public static void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) throws IOException
      Helper method for opening all Openable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when opening the Component instances.
      aComponents - The Collection containing the Component instances to open (in case them implement the Openable interface).
      Throws:
      IOException - in case initialization of at least one Openable instance failed.
    • open

      public static void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) throws IOException
      Helper method for opening all Openable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when opening the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
      Throws:
      IOException - in case initialization of at least one Openable instance failed.
    • open

      @SafeVarargs public static void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) throws IOException
      Helper method for opening all Openable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when opening the Component instances.
      aComponents - The Collection containing the Component instances to open (in case them implement the Openable interface).
      Throws:
      IOException - in case initialization of at least one Openable instance failed.
    • open

      @SafeVarargs public static void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) throws IOException
      Helper method for opening all Openable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when opening the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
      Throws:
      IOException - in case initialization of at least one Openable instance failed.
    • open

      public static <CON> void open(Object aComponent, CON aConnection) throws IOException
      Helper method, configuring the given Component in case it is ConnectionOpenable.
      Type Parameters:
      CON - the generic type
      Parameters:
      aComponent - The Component to configure.
      aConnection - the connection
      Throws:
      IOException - Thrown in case connecting failed.
    • open

      public static <CON> void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CON aConnection, Collection<?> aComponents) throws IOException
      Helper method for configuring all ConnectionOpenable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Type Parameters:
      CON - the generic type
      Parameters:
      aComponentExecutionStrategy - The strategy to use when connecting the Component instances.
      aConnection - the connection
      aComponents - The Collection containing the Component instances to connect (in case them implement the ConnectionOpenable interface).
      Throws:
      IOException - in case connecting of at least one ConnectionOpenable instance failed.
    • open

      public static <CON> void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, CON aConnection, Collection<?> aComponents) throws IOException
      Helper method for configuring all ConnectionOpenable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Type Parameters:
      CON - the generic type
      Parameters:
      aComponentExecutionStrategy - The strategy to use when connecting the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aConnection - the connection
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
      Throws:
      IOException - in case connecting of at least one ConnectionOpenable instance failed.
    • open

      @SafeVarargs public static <CON> void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CON aConnection, Object... aComponents) throws IOException
      Helper method for configuring all ConfigureException Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Type Parameters:
      CON - the generic type
      Parameters:
      aComponentExecutionStrategy - The strategy to use when connecting the Component instances.
      aConnection - the connection
      aComponents - The Collection containing the Component instances to connect (in case them implement the ConfigureException interface).
      Throws:
      IOException - in case connecting of at least one ConfigureException instance failed.
    • open

      @SafeVarargs public static <CON> void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, CON aConnection, Object... aComponents) throws IOException
      Helper method for configuring all ConfigureException Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Type Parameters:
      CON - the generic type
      Parameters:
      aComponentExecutionStrategy - The strategy to use when connecting the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aConnection - the connection
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
      Throws:
      IOException - in case connecting of at least one ConfigureException instance failed.
    • open

      public static <INPUT, OUTPUT> void open(Object aComponent, INPUT aInputConnection, OUTPUT aOutputConnection) throws IOException
      Helper method, configuring the given Component in case it is BidirectionalConnectionOpenable.
      Type Parameters:
      INPUT - the generic type
      OUTPUT - the generic type
      Parameters:
      aComponent - The Component to configure.
      aInputConnection - the input connection
      aOutputConnection - the output connection
      Throws:
      IOException - Thrown in case connecting failed.
    • open

      public static <INPUT, OUTPUT> void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, INPUT aInputConnection, OUTPUT aOutputConnection, Collection<?> aComponents) throws IOException
      Helper method for configuring all BidirectionalConnectionOpenable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Type Parameters:
      INPUT - the generic type
      OUTPUT - the generic type
      Parameters:
      aComponentExecutionStrategy - The strategy to use when connecting the Component instances.
      aInputConnection - the input connection
      aOutputConnection - the output connection
      aComponents - The Collection containing the Component instances to connect (in case them implement the BidirectionalConnectionOpenable interface).
      Throws:
      IOException - in case connecting of at least one BidirectionalConnectionOpenable instance failed.
    • open

      public static <INPUT, OUTPUT> void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, INPUT aInputConnection, OUTPUT aOutputConnection, Collection<?> aComponents) throws IOException
      Helper method for configuring all BidirectionalConnectionOpenable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Type Parameters:
      INPUT - the generic type
      OUTPUT - the generic type
      Parameters:
      aComponentExecutionStrategy - The strategy to use when connecting the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aInputConnection - the input connection
      aOutputConnection - the output connection
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
      Throws:
      IOException - in case connecting of at least one BidirectionalConnectionOpenable instance failed.
    • open

      @SafeVarargs public static <INPUT, OUTPUT> void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, INPUT aInputConnection, OUTPUT aOutputConnection, Object... aComponents) throws IOException
      Helper method for configuring all ConfigureException Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Type Parameters:
      INPUT - the generic type
      OUTPUT - the generic type
      Parameters:
      aComponentExecutionStrategy - The strategy to use when connecting the Component instances.
      aInputConnection - the input connection
      aOutputConnection - the output connection
      aComponents - The Collection containing the Component instances to connect (in case them implement the ConfigureException interface).
      Throws:
      IOException - in case connecting of at least one ConfigureException instance failed.
    • open

      @SafeVarargs public static <INPUT, OUTPUT> void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, INPUT aInputConnection, OUTPUT aOutputConnection, Object... aComponents) throws IOException
      Helper method for configuring all ConfigureException Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Type Parameters:
      INPUT - the generic type
      OUTPUT - the generic type
      Parameters:
      aComponentExecutionStrategy - The strategy to use when connecting the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aInputConnection - the input connection
      aOutputConnection - the output connection
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
      Throws:
      IOException - in case connecting of at least one ConfigureException instance failed.
    • close

      public static void close(Object aComponent) throws IOException
      Helper method, closes the given Component in case it is Closable.
      Parameters:
      aComponent - The Component to close.
      Throws:
      IOException - Thrown in case closing or pre-closing (flushing) fails.
    • close

      public static void close(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents)
      Helper method for decomposing all Closable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when decomposing the Component instances.
      aComponents - The Collection containing the Component instances to close (in case them implement the Closable interface).
    • close

      public static void close(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents)
      Helper method for decomposing all Closable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when decomposing the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
    • close

      @SafeVarargs public static void close(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents)
      Helper method for decomposing all Closable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when decomposing the Component instances.
      aComponents - The Collection containing the Component instances to close (in case them implement the Closable interface).
    • close

      @SafeVarargs public static void close(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents)
      Helper method for decomposing all Closable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Parameters:
      aComponentExecutionStrategy - The strategy to use when decomposing the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
    • execute

      public static <T> void execute(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, org.refcodes.component.ComponentUtility.CallableFactory<T> aCallableFactory, Collection<?> aComponents, Object... aArguments) throws Exception
      Helper method for initializing all Initializable Component instances found in the provided Collection. The strategy with which the Component instances are processed is defined with the provided ExecutionStrategy. An ExecutorService can be provided in case some EJB container is to use a managed ExecutorService provided by an EJB server.
      Type Parameters:
      T - the generic type
      Parameters:
      aComponentExecutionStrategy - The strategy to use when initializing the Component instances.
      aExecutorService - The ExecutorService to use when creating threads, required in case an ExecutionStrategy.PARALLEL or ExecutionStrategy.JOIN is used.
      aCallableFactory - the callable factory
      aComponents - The Collection containing the Component instances to process (in case them implement the required interface).
      aArguments - An additional argument such as the connection CON or the context CTX required in https://www.metacodes.pro cases.
      Throws:
      Exception - in case processing of at least one Component instance failed.