java.lang.Object
org.refcodes.component.ComponentUtility
The Class ComponentUtility.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static void
close
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) static void
close
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) static void
close
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) static void
close
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) static void
Helper method, decomposes the givenComponent
in case it isDecomposable
.static void
decompose
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) Helper method for decomposing allDecomposable
Component
instances found in the providedCollection
.static void
decompose
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) Helper method for decomposing allDecomposable
Component
instances found in the providedCollection
.static void
decompose
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) Helper method for decomposing allDecomposable
Component
instances found in the providedCollection
.static void
decompose
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) Helper method for decomposing allDecomposable
Component
instances found in the providedCollection
.static void
Helper method, destroys the givenComponent
in case it isDestroyable
.static void
destroy
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) static void
destroy
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) static void
destroy
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) static void
destroy
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) static void
Helper method, disposes the givenComponent
in case it isDisposable
.static void
dispose
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) static void
dispose
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) static void
dispose
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) static void
dispose
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) static <T> void
execute
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, org.refcodes.component.ComponentUtility.CallableFactory<T> aCallableFactory, Collection<?> aComponents, Object... aArguments) Helper method for initializing allInitializable
Component
instances found in the providedCollection
.static void
static void
flush
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) static void
flush
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) static void
flush
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) static void
flush
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) static void
initialize
(Object aComponent) Helper method, initializes the givenComponent
in case it isInitializable
.static <CTX> void
initialize
(Object aComponent, CTX aContext) Helper method, configuring the givenComponent
in case it isConfigurable
.static <CTX> void
initialize
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CTX aContext, Object... aComponents) Helper method for configuring allConfigureException
Component
instances found in the providedCollection
.static <CTX> void
initialize
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CTX aContext, Collection<?> aComponents) Helper method for configuring allConfigurable
Component
instances found in the providedCollection
.static void
initialize
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) Helper method for initializing allInitializable
Component
instances found in the providedCollection
.static void
initialize
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) Helper method for initializing allInitializable
Component
instances found in the providedCollection
.static <CTX> void
initialize
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, CTX aContext, Object... aComponents) Helper method for configuring allConfigureException
Component
instances found in the providedCollection
.static <CTX> void
initialize
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, CTX aContext, Collection<?> aComponents) Helper method for configuring allConfigurable
Component
instances found in the providedCollection
.static void
initialize
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) Helper method for initializing allInitializable
Component
instances found in the providedCollection
.static void
initialize
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) Helper method for initializing allInitializable
Component
instances found in the providedCollection
.static void
static <CON> void
Helper method, configuring the givenComponent
in case it isConnectionOpenable
.static <INPUT,
OUTPUT>
voidHelper method, configuring the givenComponent
in case it isBidirectionalConnectionOpenable
.static <CON> void
open
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CON aConnection, Object... aComponents) Helper method for configuring allConfigureException
Component
instances found in the providedCollection
.static <CON> void
open
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CON aConnection, Collection<?> aComponents) Helper method for configuring allConnectionOpenable
Component
instances found in the providedCollection
.static <INPUT,
OUTPUT>
voidopen
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, INPUT aInputConnection, OUTPUT aOutputConnection, Object... aComponents) Helper method for configuring allConfigureException
Component
instances found in the providedCollection
.static <INPUT,
OUTPUT>
voidopen
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, INPUT aInputConnection, OUTPUT aOutputConnection, Collection<?> aComponents) Helper method for configuring allBidirectionalConnectionOpenable
Component
instances found in the providedCollection
.static void
static void
open
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) static <CON> void
open
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, CON aConnection, Object... aComponents) Helper method for configuring allConfigureException
Component
instances found in the providedCollection
.static <CON> void
open
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, CON aConnection, Collection<?> aComponents) Helper method for configuring allConnectionOpenable
Component
instances found in the providedCollection
.static <INPUT,
OUTPUT>
voidopen
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, INPUT aInputConnection, OUTPUT aOutputConnection, Object... aComponents) Helper method for configuring allConfigureException
Component
instances found in the providedCollection
.static <INPUT,
OUTPUT>
voidopen
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, INPUT aInputConnection, OUTPUT aOutputConnection, Collection<?> aComponents) Helper method for configuring allBidirectionalConnectionOpenable
Component
instances found in the providedCollection
.static void
open
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) static void
open
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) static void
static void
pause
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) static void
pause
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) static void
pause
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) static void
pause
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) static void
Helper method, resets the givenComponent
in case it isResetable
.static void
reset
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) static void
reset
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) static void
reset
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) static void
reset
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) static void
static void
resume
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) static void
resume
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) static void
resume
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) static void
resume
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) static void
static void
start
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) static void
start
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) static void
start
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) static void
start
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) static void
static void
static void
stop
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) static void
stop
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) static void
stop
(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents)
-
Method Details
-
initialize
Helper method, initializes the givenComponent
in case it isInitializable
.- Parameters:
aComponent
- TheComponent
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 allInitializable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when initializing theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to initialize (in case them implement theInitializable
interface).- Throws:
InitializeException
- in case initialization of at least oneInitializable
instance failed.
-
initialize
public static void initialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) throws InitializeException Helper method for initializing allInitializable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when initializing theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).- Throws:
InitializeException
- in case initialization of at least oneInitializable
instance failed.
-
initialize
@SafeVarargs public static void initialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) throws InitializeException Helper method for initializing allInitializable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when initializing theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to initialize (in case them implement theInitializable
interface).- Throws:
InitializeException
- in case initialization of at least oneInitializable
instance failed.
-
initialize
@SafeVarargs public static void initialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) throws InitializeException Helper method for initializing allInitializable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when initializing theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).- Throws:
InitializeException
- in case initialization of at least oneInitializable
instance failed.
-
initialize
Helper method, configuring the givenComponent
in case it isConfigurable
.- Type Parameters:
CTX
- the generic type- Parameters:
aComponent
- TheComponent
to configure.aContext
- the context- Throws:
ConfigureException
- the configure exceptionInitializeException
-
initialize
public static <CTX> void initialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CTX aContext, Collection<?> aComponents) throws ConfigureException Helper method for configuring allConfigurable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Type Parameters:
CTX
- the generic type- Parameters:
aComponentExecutionStrategy
- The strategy to use when initializing theComponent
instances.aContext
- the contextaComponents
- TheCollection
containing theComponent
instances to initialize (in case them implement theConfigurable
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 allConfigurable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Type Parameters:
CTX
- the generic type- Parameters:
aComponentExecutionStrategy
- The strategy to use when initializing theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aContext
- the contextaComponents
- TheCollection
containing theComponent
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 allConfigureException
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Type Parameters:
CTX
- the generic type- Parameters:
aComponentExecutionStrategy
- The strategy to use when initializing theComponent
instances.aContext
- the contextaComponents
- TheCollection
containing theComponent
instances to initialize (in case them implement theConfigureException
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 allConfigureException
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Type Parameters:
CTX
- the generic type- Parameters:
aComponentExecutionStrategy
- The strategy to use when initializing theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aContext
- the contextaComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).- Throws:
ConfigureException
- the configure exception
-
start
- Parameters:
aComponent
- TheComponent
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 allStartable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when starting theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to start (in case them implement theStartable
interface).- Throws:
StartException
- in case initialization of at least oneStartable
instance failed.
-
start
public static void start(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) throws StartException Helper method for starting allStartable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when starting theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).- Throws:
StartException
- in case initialization of at least oneStartable
instance failed.
-
start
@SafeVarargs public static void start(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) throws StartException Helper method for starting allStartable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when starting theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to start (in case them implement theStartable
interface).- Throws:
StartException
- in case initialization of at least oneStartable
instance failed.
-
start
@SafeVarargs public static void start(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) throws StartException Helper method for starting allStartable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when starting theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).- Throws:
StartException
- in case initialization of at least oneStartable
instance failed.
-
pause
- Parameters:
aComponent
- TheComponent
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 allPausable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when pausing theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to pause (in case them implement thePausable
interface).- Throws:
PauseException
- in case initialization of at least onePausable
instance failed.
-
pause
public static void pause(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) throws PauseException Helper method for pausing allPausable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when pausing theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).- Throws:
PauseException
- in case initialization of at least onePausable
instance failed.
-
pause
@SafeVarargs public static void pause(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) throws PauseException Helper method for pausing allPausable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when pausing theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to pause (in case them implement thePausable
interface).- Throws:
PauseException
- in case initialization of at least onePausable
instance failed.
-
pause
@SafeVarargs public static void pause(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) throws PauseException Helper method for pausing allPausable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when pausing theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).- Throws:
PauseException
- in case initialization of at least onePausable
instance failed.
-
resume
- Parameters:
aComponent
- TheComponent
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 allResumable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when resuming theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to resume (in case them implement theResumable
interface).- Throws:
ResumeException
- in case initialization of at least oneResumable
instance failed.
-
resume
public static void resume(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) throws ResumeException Helper method for resuming allResumable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when resuming theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).- Throws:
ResumeException
- in case initialization of at least oneResumable
instance failed.
-
resume
@SafeVarargs public static void resume(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) throws ResumeException Helper method for resuming allResumable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when resuming theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to resume (in case them implement theResumable
interface).- Throws:
ResumeException
- in case initialization of at least oneResumable
instance failed.
-
resume
@SafeVarargs public static void resume(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) throws ResumeException Helper method for resuming allResumable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when resuming theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).- Throws:
ResumeException
- in case initialization of at least oneResumable
instance failed.
-
stop
- Parameters:
aComponent
- TheComponent
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 allStoppable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when stoping theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to stop (in case them implement theStoppable
interface).- Throws:
StopException
- in case initialization of at least oneStoppable
instance failed.
-
stop
public static void stop(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) throws StopException Helper method for stopping allStoppable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when stoping theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).- Throws:
StopException
- in case initialization of at least oneStoppable
instance failed.
-
stop
@SafeVarargs public static void stop(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) throws StopException Helper method for stoping allStoppable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when stoping theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to stop (in case them implement theStoppable
interface).- Throws:
StopException
- in case initialization of at least oneStoppable
instance failed.
-
stop
@SafeVarargs public static void stop(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) throws StopException Helper method for stoping allStoppable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when stoping theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).- Throws:
StopException
- in case initialization of at least oneStoppable
instance failed.
-
destroy
Helper method, destroys the givenComponent
in case it isDestroyable
.- Parameters:
aComponent
- TheComponent
to destroy.
-
destroy
public static void destroy(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) Helper method for destroying allDestroyable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when destroying theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to destroy (in case them implement theDestroyable
interface).
-
destroy
public static void destroy(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) Helper method for destroying allDestroyable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when destroying theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
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 allDestroyable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when destroying theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to destroy (in case them implement theDestroyable
interface).
-
destroy
@SafeVarargs public static void destroy(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) Helper method for destroying allDestroyable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when destroying theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).
-
decompose
Helper method, decomposes the givenComponent
in case it isDecomposable
.- Parameters:
aComponent
- TheComponent
to decompose.
-
decompose
public static void decompose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) Helper method for decomposing allDecomposable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when decomposing theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to decompose (in case them implement theDecomposable
interface).
-
decompose
public static void decompose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) Helper method for decomposing allDecomposable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when decomposing theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
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 allDecomposable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when decomposing theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to decompose (in case them implement theDecomposable
interface).
-
decompose
@SafeVarargs public static void decompose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) Helper method for decomposing allDecomposable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when decomposing theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).
-
dispose
Helper method, disposes the givenComponent
in case it isDisposable
.- Parameters:
aComponent
- TheComponent
to dispose.
-
dispose
public static void dispose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) Helper method for decomposing allDisposable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when decomposing theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to dispose (in case them implement theDisposable
interface).
-
dispose
public static void dispose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) Helper method for decomposing allDisposable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when decomposing theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
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 allDisposable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when decomposing theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to dispose (in case them implement theDisposable
interface).
-
dispose
@SafeVarargs public static void dispose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) Helper method for decomposing allDisposable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when decomposing theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).
-
flush
- Parameters:
aComponent
- TheComponent
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 allFlushable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when flushing theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to flush (in case them implement theFlushable
interface).- Throws:
IOException
- in case initialization of at least oneFlushable
instance failed.
-
flush
public static void flush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) throws IOException Helper method for flushing allFlushable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when flushing theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).- Throws:
IOException
- in case initialization of at least oneFlushable
instance failed.
-
flush
@SafeVarargs public static void flush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) throws IOException Helper method for flushing allFlushable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when flushing theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to flush (in case them implement theFlushable
interface).- Throws:
IOException
- in case initialization of at least oneFlushable
instance failed.
-
flush
@SafeVarargs public static void flush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) throws IOException Helper method for flushing allFlushable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when flushing theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).- Throws:
IOException
- in case initialization of at least oneFlushable
instance failed.
-
reset
Helper method, resets the givenComponent
in case it isResetable
.- Parameters:
aComponent
- TheComponent
to reset.
-
reset
public static void reset(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) Helper method for decomposing allResetable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when decomposing theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to reset (in case them implement theResetable
interface).
-
reset
public static void reset(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) Helper method for decomposing allResetable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when decomposing theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
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 allResetable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when decomposing theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to reset (in case them implement theResetable
interface).
-
reset
@SafeVarargs public static void reset(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) Helper method for decomposing allResetable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when decomposing theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).
-
open
- Parameters:
aComponent
- TheComponent
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 allOpenable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when opening theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to open (in case them implement theOpenable
interface).- Throws:
IOException
- in case initialization of at least oneOpenable
instance failed.
-
open
public static void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) throws IOException Helper method for opening allOpenable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when opening theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).- Throws:
IOException
- in case initialization of at least oneOpenable
instance failed.
-
open
@SafeVarargs public static void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) throws IOException Helper method for opening allOpenable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when opening theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to open (in case them implement theOpenable
interface).- Throws:
IOException
- in case initialization of at least oneOpenable
instance failed.
-
open
@SafeVarargs public static void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) throws IOException Helper method for opening allOpenable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when opening theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).- Throws:
IOException
- in case initialization of at least oneOpenable
instance failed.
-
open
Helper method, configuring the givenComponent
in case it isConnectionOpenable
.- Type Parameters:
CON
- the generic type- Parameters:
aComponent
- TheComponent
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 allConnectionOpenable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Type Parameters:
CON
- the generic type- Parameters:
aComponentExecutionStrategy
- The strategy to use when connecting theComponent
instances.aConnection
- the connectionaComponents
- TheCollection
containing theComponent
instances to connect (in case them implement theConnectionOpenable
interface).- Throws:
IOException
- in case connecting of at least oneConnectionOpenable
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 allConnectionOpenable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Type Parameters:
CON
- the generic type- Parameters:
aComponentExecutionStrategy
- The strategy to use when connecting theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aConnection
- the connectionaComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).- Throws:
IOException
- in case connecting of at least oneConnectionOpenable
instance failed.
-
open
@SafeVarargs public static <CON> void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CON aConnection, Object... aComponents) throws IOException Helper method for configuring allConfigureException
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Type Parameters:
CON
- the generic type- Parameters:
aComponentExecutionStrategy
- The strategy to use when connecting theComponent
instances.aConnection
- the connectionaComponents
- TheCollection
containing theComponent
instances to connect (in case them implement theConfigureException
interface).- Throws:
IOException
- in case connecting of at least oneConfigureException
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 allConfigureException
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Type Parameters:
CON
- the generic type- Parameters:
aComponentExecutionStrategy
- The strategy to use when connecting theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aConnection
- the connectionaComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).- Throws:
IOException
- in case connecting of at least oneConfigureException
instance failed.
-
open
public static <INPUT,OUTPUT> void open(Object aComponent, INPUT aInputConnection, OUTPUT aOutputConnection) throws IOException Helper method, configuring the givenComponent
in case it isBidirectionalConnectionOpenable
.- Type Parameters:
INPUT
- the generic typeOUTPUT
- the generic type- Parameters:
aComponent
- TheComponent
to configure.aInputConnection
- the input connectionaOutputConnection
- 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 allBidirectionalConnectionOpenable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Type Parameters:
INPUT
- the generic typeOUTPUT
- the generic type- Parameters:
aComponentExecutionStrategy
- The strategy to use when connecting theComponent
instances.aInputConnection
- the input connectionaOutputConnection
- the output connectionaComponents
- TheCollection
containing theComponent
instances to connect (in case them implement theBidirectionalConnectionOpenable
interface).- Throws:
IOException
- in case connecting of at least oneBidirectionalConnectionOpenable
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 allBidirectionalConnectionOpenable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Type Parameters:
INPUT
- the generic typeOUTPUT
- the generic type- Parameters:
aComponentExecutionStrategy
- The strategy to use when connecting theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aInputConnection
- the input connectionaOutputConnection
- the output connectionaComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).- Throws:
IOException
- in case connecting of at least oneBidirectionalConnectionOpenable
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 allConfigureException
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Type Parameters:
INPUT
- the generic typeOUTPUT
- the generic type- Parameters:
aComponentExecutionStrategy
- The strategy to use when connecting theComponent
instances.aInputConnection
- the input connectionaOutputConnection
- the output connectionaComponents
- TheCollection
containing theComponent
instances to connect (in case them implement theConfigureException
interface).- Throws:
IOException
- in case connecting of at least oneConfigureException
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 allConfigureException
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Type Parameters:
INPUT
- the generic typeOUTPUT
- the generic type- Parameters:
aComponentExecutionStrategy
- The strategy to use when connecting theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aInputConnection
- the input connectionaOutputConnection
- the output connectionaComponents
- TheCollection
containing theComponent
instances to process (in case them implement the required interface).- Throws:
IOException
- in case connecting of at least oneConfigureException
instance failed.
-
close
- Parameters:
aComponent
- TheComponent
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 allClosable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when decomposing theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to close (in case them implement theClosable
interface).
-
close
public static void close(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) Helper method for decomposing allClosable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when decomposing theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
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 allClosable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
.- Parameters:
aComponentExecutionStrategy
- The strategy to use when decomposing theComponent
instances.aComponents
- TheCollection
containing theComponent
instances to close (in case them implement theClosable
interface).
-
close
@SafeVarargs public static void close(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) Helper method for decomposing allClosable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Parameters:
aComponentExecutionStrategy
- The strategy to use when decomposing theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aComponents
- TheCollection
containing theComponent
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 allInitializable
Component
instances found in the providedCollection
. The strategy with which theComponent
instances are processed is defined with the providedExecutionStrategy
. AnExecutorService
can be provided in case some EJB container is to use a managedExecutorService
provided by an EJB server.- Type Parameters:
T
- the generic type- Parameters:
aComponentExecutionStrategy
- The strategy to use when initializing theComponent
instances.aExecutorService
- TheExecutorService
to use when creating threads, required in case anExecutionStrategy.PARALLEL
orExecutionStrategy.JOIN
is used.aCallableFactory
- the callable factoryaComponents
- TheCollection
containing theComponent
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 oneComponent
instance failed.
-