Class ComponentUtility


  • public final class ComponentUtility
    extends java.lang.Object
    The Class ComponentUtility.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void close​(java.lang.Object aComponent)
      Helper method, closes the given Component in case it is Closable.
      static void close​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)
      Helper method for decomposing all Closable Component instances found in the provided Collection.
      static void close​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)
      Helper method for decomposing all Closable Component instances found in the provided Collection.
      static void close​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)
      Helper method for decomposing all Closable Component instances found in the provided Collection.
      static void close​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)
      Helper method for decomposing all Closable Component instances found in the provided Collection.
      static void decompose​(java.lang.Object aComponent)
      Helper method, decomposes the given Component in case it is Decomposeable.
      static void decompose​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)
      Helper method for decomposing all Decomposeable Component instances found in the provided Collection.
      static void decompose​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)
      Helper method for decomposing all Decomposeable Component instances found in the provided Collection.
      static void decompose​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)
      Helper method for decomposing all Decomposeable Component instances found in the provided Collection.
      static void decompose​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)
      Helper method for decomposing all Decomposeable Component instances found in the provided Collection.
      static void destroy​(java.lang.Object aComponent)
      Helper method, destroys the given Component in case it is Destroyable.
      static void destroy​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)
      Helper method for destroying all Destroyable Component instances found in the provided Collection.
      static void destroy​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)
      Helper method for destroying all Destroyable Component instances found in the provided Collection.
      static void destroy​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)
      Helper method for destroying all Destroyable Component instances found in the provided Collection.
      static void destroy​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)
      Helper method for destroying all Destroyable Component instances found in the provided Collection.
      static void dispose​(java.lang.Object aComponent)
      Helper method, disposes the given Component in case it is Disposable.Disposedable.
      static void dispose​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)
      Helper method for decomposing all Disposable.Disposedable Component instances found in the provided Collection.
      static void dispose​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)
      Helper method for decomposing all Disposable.Disposedable Component instances found in the provided Collection.
      static void dispose​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)
      Helper method for decomposing all Disposable.Disposedable Component instances found in the provided Collection.
      static void dispose​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)
      Helper method for decomposing all Disposable.Disposedable Component instances found in the provided Collection.
      static <T> void execute​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, org.refcodes.component.ComponentUtility.CallableFactory<T> aCallableFactory, java.util.Collection<?> aComponents, java.lang.Object... aArguments)
      Helper method for initializing all Initializable Component instances found in the provided Collection.
      static void flush​(java.lang.Object aComponent)
      Helper method, flushs the given Component in case it is Flushable.
      static void flush​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)
      Helper method for flushing all Flushable Component instances found in the provided Collection.
      static void flush​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)
      Helper method for flushing all Flushable Component instances found in the provided Collection.
      static void flush​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)
      Helper method for flushing all Flushable Component instances found in the provided Collection.
      static void flush​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)
      Helper method for flushing all Flushable Component instances found in the provided Collection.
      static void initialize​(java.lang.Object aComponent)
      Helper method, initializes the given Component in case it is Initializable.
      static <CTX> void initialize​(java.lang.Object aComponent, CTX aContext)
      Helper method, configuring the given Component in case it is Configurable.
      static <CTX> void initialize​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CTX aContext, java.lang.Object... aComponents)
      Helper method for configuring all ConfigureException Component instances found in the provided Collection.
      static <CTX> void initialize​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CTX aContext, java.util.Collection<?> aComponents)
      Helper method for configuring all Configurable Component instances found in the provided Collection.
      static void initialize​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)
      Helper method for initializing all Initializable Component instances found in the provided Collection.
      static void initialize​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)
      Helper method for initializing all Initializable Component instances found in the provided Collection.
      static <CTX> void initialize​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, CTX aContext, java.lang.Object... aComponents)
      Helper method for configuring all ConfigureException Component instances found in the provided Collection.
      static <CTX> void initialize​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, CTX aContext, java.util.Collection<?> aComponents)
      Helper method for configuring all Configurable Component instances found in the provided Collection.
      static void initialize​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)
      Helper method for initializing all Initializable Component instances found in the provided Collection.
      static void initialize​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)
      Helper method for initializing all Initializable Component instances found in the provided Collection.
      static void open​(java.lang.Object aComponent)
      Helper method, opens the given Component in case it is Openable.
      static <CON> void open​(java.lang.Object aComponent, CON aConnection)
      Helper method, configuring the given Component in case it is ConnectionOpenable.
      static <INPUT,OUTPUT>
      void
      open​(java.lang.Object aComponent, INPUT aInputConnection, OUTPUT aOutputConnection)
      Helper method, configuring the given Component in case it is BidirectionalConnectionOpenable.
      static <CON> void open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CON aConnection, java.lang.Object... aComponents)
      Helper method for configuring all ConfigureException Component instances found in the provided Collection.
      static <CON> void open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CON aConnection, java.util.Collection<?> aComponents)
      Helper method for configuring all ConnectionOpenable Component instances found in the provided Collection.
      static <INPUT,OUTPUT>
      void
      open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, INPUT aInputConnection, OUTPUT aOutputConnection, java.lang.Object... aComponents)
      Helper method for configuring all ConfigureException Component instances found in the provided Collection.
      static <INPUT,OUTPUT>
      void
      open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, INPUT aInputConnection, OUTPUT aOutputConnection, java.util.Collection<?> aComponents)
      Helper method for configuring all BidirectionalConnectionOpenable Component instances found in the provided Collection.
      static void open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)
      Helper method for opening all Openable Component instances found in the provided Collection.
      static void open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)
      Helper method for opening all Openable Component instances found in the provided Collection.
      static <CON> void open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, CON aConnection, java.lang.Object... aComponents)
      Helper method for configuring all ConfigureException Component instances found in the provided Collection.
      static <CON> void open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, CON aConnection, java.util.Collection<?> aComponents)
      Helper method for configuring all ConnectionOpenable Component instances found in the provided Collection.
      static <INPUT,OUTPUT>
      void
      open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, INPUT aInputConnection, OUTPUT aOutputConnection, java.lang.Object... aComponents)
      Helper method for configuring all ConfigureException Component instances found in the provided Collection.
      static <INPUT,OUTPUT>
      void
      open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, INPUT aInputConnection, OUTPUT aOutputConnection, java.util.Collection<?> aComponents)
      Helper method for configuring all BidirectionalConnectionOpenable Component instances found in the provided Collection.
      static void open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)
      Helper method for opening all Openable Component instances found in the provided Collection.
      static void open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)
      Helper method for opening all Openable Component instances found in the provided Collection.
      static void pause​(java.lang.Object aComponent)
      Helper method, pauses the given Component in case it is Pausable.
      static void pause​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)
      Helper method for pausing all Pausable Component instances found in the provided Collection.
      static void pause​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)
      Helper method for pausing all Pausable Component instances found in the provided Collection.
      static void pause​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)
      Helper method for pausing all Pausable Component instances found in the provided Collection.
      static void pause​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)
      Helper method for pausing all Pausable Component instances found in the provided Collection.
      static void reset​(java.lang.Object aComponent)
      Helper method, resets the given Component in case it is Resetable.
      static void reset​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)
      Helper method for decomposing all Resetable Component instances found in the provided Collection.
      static void reset​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)
      Helper method for decomposing all Resetable Component instances found in the provided Collection.
      static void reset​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)
      Helper method for decomposing all Resetable Component instances found in the provided Collection.
      static void reset​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)
      Helper method for decomposing all Resetable Component instances found in the provided Collection.
      static void resume​(java.lang.Object aComponent)
      Helper method, resumes the given Component in case it is Resumable.
      static void resume​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)
      Helper method for resuming all Resumable Component instances found in the provided Collection.
      static void resume​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)
      Helper method for resuming all Resumable Component instances found in the provided Collection.
      static void resume​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)
      Helper method for resuming all Resumable Component instances found in the provided Collection.
      static void resume​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)
      Helper method for resuming all Resumable Component instances found in the provided Collection.
      static void start​(java.lang.Object aComponent)
      Helper method, starts the given Component in case it is Startable.
      static void start​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)
      Helper method for starting all Startable Component instances found in the provided Collection.
      static void start​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)
      Helper method for starting all Startable Component instances found in the provided Collection.
      static void start​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)
      Helper method for starting all Startable Component instances found in the provided Collection.
      static void start​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)
      Helper method for starting all Startable Component instances found in the provided Collection.
      static void stop​(java.lang.Object aComponent)
      Helper method, stops the given Component in case it is Stoppable.
      static void stop​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)
      Helper method for stoping all Stoppable Component instances found in the provided Collection.
      static void stop​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)
      Helper method for stopping all Stoppable Component instances found in the provided Collection.
      static void stop​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)
      Helper method for stoping all Stoppable Component instances found in the provided Collection.
      static void stop​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)
      Helper method for stopping all Stoppable Component instances found in the provided Collection.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • initialize

        public static void initialize​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                      java.util.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,
                                      java.util.concurrent.ExecutorService aExecutorService,
                                      java.util.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,
                                      java.lang.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,
                                      java.util.concurrent.ExecutorService aExecutorService,
                                      java.lang.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​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                            CTX aContext,
                                            java.util.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,
                                            java.util.concurrent.ExecutorService aExecutorService,
                                            CTX aContext,
                                            java.util.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,
                                            java.lang.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,
                                            java.util.concurrent.ExecutorService aExecutorService,
                                            CTX aContext,
                                            java.lang.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​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                 java.util.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,
                                 java.util.concurrent.ExecutorService aExecutorService,
                                 java.util.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,
                                 java.lang.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,
                                 java.util.concurrent.ExecutorService aExecutorService,
                                 java.lang.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​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                 java.util.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,
                                 java.util.concurrent.ExecutorService aExecutorService,
                                 java.util.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,
                                 java.lang.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,
                                 java.util.concurrent.ExecutorService aExecutorService,
                                 java.lang.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​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                  java.util.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,
                                  java.util.concurrent.ExecutorService aExecutorService,
                                  java.util.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,
                                  java.lang.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,
                                  java.util.concurrent.ExecutorService aExecutorService,
                                  java.lang.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​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                java.util.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,
                                java.util.concurrent.ExecutorService aExecutorService,
                                java.util.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,
                                java.lang.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,
                                java.util.concurrent.ExecutorService aExecutorService,
                                java.lang.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​(java.lang.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,
                                   java.util.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,
                                   java.util.concurrent.ExecutorService aExecutorService,
                                   java.util.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,
                                   java.lang.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,
                                   java.util.concurrent.ExecutorService aExecutorService,
                                   java.lang.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​(java.lang.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,
                                     java.util.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,
                                     java.util.concurrent.ExecutorService aExecutorService,
                                     java.util.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,
                                     java.lang.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,
                                     java.util.concurrent.ExecutorService aExecutorService,
                                     java.lang.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​(java.lang.Object aComponent)
        Helper method, disposes the given Component in case it is Disposable.Disposedable.
        Parameters:
        aComponent - The Component to dispose.
      • dispose

        public static void dispose​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                   java.util.Collection<?> aComponents)
        Helper method for decomposing all Disposable.Disposedable 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.Disposedable interface).
      • dispose

        public static void dispose​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                   java.util.concurrent.ExecutorService aExecutorService,
                                   java.util.Collection<?> aComponents)
        Helper method for decomposing all Disposable.Disposedable 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,
                                   java.lang.Object... aComponents)
        Helper method for decomposing all Disposable.Disposedable 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.Disposedable interface).
      • dispose

        @SafeVarargs
        public static void dispose​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                   java.util.concurrent.ExecutorService aExecutorService,
                                   java.lang.Object... aComponents)
        Helper method for decomposing all Disposable.Disposedable 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​(java.lang.Object aComponent)
                          throws OpenException
        Helper method, flushs the given Component in case it is Flushable.
        Parameters:
        aComponent - The Component to flush.
        Throws:
        OpenException - Thrown in case initialization failed.
      • flush

        public static void flush​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                 java.util.Collection<?> aComponents)
                          throws OpenException
        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:
        OpenException - in case initialization of at least one Flushable instance failed.
      • flush

        public static void flush​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                 java.util.concurrent.ExecutorService aExecutorService,
                                 java.util.Collection<?> aComponents)
                          throws OpenException
        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:
        OpenException - in case initialization of at least one Flushable instance failed.
      • flush

        @SafeVarargs
        public static void flush​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                 java.lang.Object... aComponents)
                          throws OpenException
        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:
        OpenException - in case initialization of at least one Flushable instance failed.
      • flush

        @SafeVarargs
        public static void flush​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                 java.util.concurrent.ExecutorService aExecutorService,
                                 java.lang.Object... aComponents)
                          throws OpenException
        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:
        OpenException - in case initialization of at least one Flushable instance failed.
      • reset

        public static void reset​(java.lang.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,
                                 java.util.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,
                                 java.util.concurrent.ExecutorService aExecutorService,
                                 java.util.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,
                                 java.lang.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,
                                 java.util.concurrent.ExecutorService aExecutorService,
                                 java.lang.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​(java.lang.Object aComponent)
                         throws OpenException
        Helper method, opens the given Component in case it is Openable.
        Parameters:
        aComponent - The Component to open.
        Throws:
        OpenException - Thrown in case initialization failed.
      • open

        public static void open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                java.util.Collection<?> aComponents)
                         throws OpenException
        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:
        OpenException - in case initialization of at least one Openable instance failed.
      • open

        public static void open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                java.util.concurrent.ExecutorService aExecutorService,
                                java.util.Collection<?> aComponents)
                         throws OpenException
        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:
        OpenException - in case initialization of at least one Openable instance failed.
      • open

        @SafeVarargs
        public static void open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                java.lang.Object... aComponents)
                         throws OpenException
        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:
        OpenException - in case initialization of at least one Openable instance failed.
      • open

        @SafeVarargs
        public static void open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                java.util.concurrent.ExecutorService aExecutorService,
                                java.lang.Object... aComponents)
                         throws OpenException
        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:
        OpenException - in case initialization of at least one Openable instance failed.
      • open

        public static <CON> void open​(java.lang.Object aComponent,
                                      CON aConnection)
                               throws OpenException
        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:
        OpenException - Thrown in case connecting failed.
      • open

        public static <CON> void open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                      CON aConnection,
                                      java.util.Collection<?> aComponents)
                               throws OpenException
        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:
        OpenException - in case connecting of at least one ConnectionOpenable instance failed.
      • open

        public static <CON> void open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                      java.util.concurrent.ExecutorService aExecutorService,
                                      CON aConnection,
                                      java.util.Collection<?> aComponents)
                               throws OpenException
        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:
        OpenException - in case connecting of at least one ConnectionOpenable instance failed.
      • open

        @SafeVarargs
        public static <CON> void open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                      CON aConnection,
                                      java.lang.Object... aComponents)
                               throws OpenException
        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:
        OpenException - in case connecting of at least one ConfigureException instance failed.
      • open

        @SafeVarargs
        public static <CON> void open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                      java.util.concurrent.ExecutorService aExecutorService,
                                      CON aConnection,
                                      java.lang.Object... aComponents)
                               throws OpenException
        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:
        OpenException - in case connecting of at least one ConfigureException instance failed.
      • open

        public static <INPUT,OUTPUT> void open​(java.lang.Object aComponent,
                                               INPUT aInputConnection,
                                               OUTPUT aOutputConnection)
                                        throws OpenException
        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:
        OpenException - Thrown in case connecting failed.
      • open

        public static <INPUT,OUTPUT> void open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                               INPUT aInputConnection,
                                               OUTPUT aOutputConnection,
                                               java.util.Collection<?> aComponents)
                                        throws OpenException
        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:
        OpenException - in case connecting of at least one BidirectionalConnectionOpenable instance failed.
      • open

        public static <INPUT,OUTPUT> void open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                               java.util.concurrent.ExecutorService aExecutorService,
                                               INPUT aInputConnection,
                                               OUTPUT aOutputConnection,
                                               java.util.Collection<?> aComponents)
                                        throws OpenException
        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:
        OpenException - 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,
                                               java.lang.Object... aComponents)
                                        throws OpenException
        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:
        OpenException - in case connecting of at least one ConfigureException instance failed.
      • open

        @SafeVarargs
        public static <INPUT,OUTPUT> void open​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                               java.util.concurrent.ExecutorService aExecutorService,
                                               INPUT aInputConnection,
                                               OUTPUT aOutputConnection,
                                               java.lang.Object... aComponents)
                                        throws OpenException
        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:
        OpenException - in case connecting of at least one ConfigureException instance failed.
      • close

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

        public static void close​(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
                                 java.util.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,
                                 java.util.concurrent.ExecutorService aExecutorService,
                                 java.util.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,
                                 java.lang.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,
                                 java.util.concurrent.ExecutorService aExecutorService,
                                 java.lang.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,
                                       java.util.concurrent.ExecutorService aExecutorService,
                                       org.refcodes.component.ComponentUtility.CallableFactory<T> aCallableFactory,
                                       java.util.Collection<?> aComponents,
                                       java.lang.Object... aArguments)
                                throws java.lang.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 special cases.
        Throws:
        java.lang.Exception - in case processing of at least one Component instance failed.