java.lang.Object
org.refcodes.component.ComponentUtility
The Class ComponentUtility.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidclose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) static voidclose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) static voidclose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) static voidclose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) static voidHelper method, decomposes the givenComponentin case it isDecomposable.static voiddecompose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) Helper method for decomposing allDecomposableComponentinstances found in the providedCollection.static voiddecompose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) Helper method for decomposing allDecomposableComponentinstances found in the providedCollection.static voiddecompose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) Helper method for decomposing allDecomposableComponentinstances found in the providedCollection.static voiddecompose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) Helper method for decomposing allDecomposableComponentinstances found in the providedCollection.static voidHelper method, destroys the givenComponentin case it isDestroyable.static voiddestroy(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) static voiddestroy(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) static voiddestroy(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) static voiddestroy(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) static voidHelper method, disposes the givenComponentin case it isDisposable.static voiddispose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) static voiddispose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) static voiddispose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) static voiddispose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) static <T> voidexecute(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, org.refcodes.component.ComponentUtility.CallableFactory<T> aCallableFactory, Collection<?> aComponents, Object... aArguments) Helper method for initializing allInitializableComponentinstances found in the providedCollection.static voidstatic voidflush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) static voidflush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) static voidflush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) static voidflush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) static voidinitialize(Object aComponent) Helper method, initializes the givenComponentin case it isInitializable.static <CTX> voidinitialize(Object aComponent, CTX aContext) Helper method, configuring the givenComponentin case it isConfigurable.static <CTX> voidinitialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CTX aContext, Object... aComponents) Helper method for configuring allConfigureExceptionComponentinstances found in the providedCollection.static <CTX> voidinitialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CTX aContext, Collection<?> aComponents) Helper method for configuring allConfigurableComponentinstances found in the providedCollection.static voidinitialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) Helper method for initializing allInitializableComponentinstances found in the providedCollection.static voidinitialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) Helper method for initializing allInitializableComponentinstances found in the providedCollection.static <CTX> voidinitialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, CTX aContext, Object... aComponents) Helper method for configuring allConfigureExceptionComponentinstances found in the providedCollection.static <CTX> voidinitialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, CTX aContext, Collection<?> aComponents) Helper method for configuring allConfigurableComponentinstances found in the providedCollection.static voidinitialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) Helper method for initializing allInitializableComponentinstances found in the providedCollection.static voidinitialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) Helper method for initializing allInitializableComponentinstances found in the providedCollection.static voidstatic <CON> voidHelper method, configuring the givenComponentin case it isConnectionOpenable.static <INPUT,OUTPUT>
voidHelper method, configuring the givenComponentin case it isBidirectionalConnectionOpenable.static <CON> voidopen(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CON aConnection, Object... aComponents) Helper method for configuring allConfigureExceptionComponentinstances found in the providedCollection.static <CON> voidopen(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CON aConnection, Collection<?> aComponents) Helper method for configuring allConnectionOpenableComponentinstances found in the providedCollection.static <INPUT,OUTPUT>
voidopen(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, INPUT aInputConnection, OUTPUT aOutputConnection, Object... aComponents) Helper method for configuring allConfigureExceptionComponentinstances found in the providedCollection.static <INPUT,OUTPUT>
voidopen(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, INPUT aInputConnection, OUTPUT aOutputConnection, Collection<?> aComponents) Helper method for configuring allBidirectionalConnectionOpenableComponentinstances found in the providedCollection.static voidstatic voidopen(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) static <CON> voidopen(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, CON aConnection, Object... aComponents) Helper method for configuring allConfigureExceptionComponentinstances found in the providedCollection.static <CON> voidopen(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, CON aConnection, Collection<?> aComponents) Helper method for configuring allConnectionOpenableComponentinstances 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 allConfigureExceptionComponentinstances 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 allBidirectionalConnectionOpenableComponentinstances found in the providedCollection.static voidopen(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) static voidopen(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) static voidstatic voidpause(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) static voidpause(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) static voidpause(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) static voidpause(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) static voidHelper method, resets the givenComponentin case it isResetable.static voidreset(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) static voidreset(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) static voidreset(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) static voidreset(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) static voidstatic voidresume(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) static voidresume(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) static voidresume(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) static voidresume(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) static voidstatic voidstart(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) static voidstart(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) static voidstart(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) static voidstart(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) static voidstatic voidstatic voidstop(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) static voidstop(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) static voidstop(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents)
-
Method Details
-
initialize
Helper method, initializes the givenComponentin case it isInitializable.- Parameters:
aComponent- TheComponentto 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 allInitializableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when initializing theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to initialize (in case them implement theInitializableinterface).- Throws:
InitializeException- in case initialization of at least oneInitializableinstance failed.
-
initialize
public static void initialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) throws InitializeException Helper method for initializing allInitializableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when initializing theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).- Throws:
InitializeException- in case initialization of at least oneInitializableinstance failed.
-
initialize
@SafeVarargs public static void initialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) throws InitializeException Helper method for initializing allInitializableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when initializing theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to initialize (in case them implement theInitializableinterface).- Throws:
InitializeException- in case initialization of at least oneInitializableinstance failed.
-
initialize
@SafeVarargs public static void initialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) throws InitializeException Helper method for initializing allInitializableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when initializing theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).- Throws:
InitializeException- in case initialization of at least oneInitializableinstance failed.
-
initialize
Helper method, configuring the givenComponentin case it isConfigurable.- Type Parameters:
CTX- the generic type- Parameters:
aComponent- TheComponentto 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 allConfigurableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Type Parameters:
CTX- the generic type- Parameters:
aComponentExecutionStrategy- The strategy to use when initializing theComponentinstances.aContext- the contextaComponents- TheCollectioncontaining theComponentinstances to initialize (in case them implement theConfigurableinterface).- 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 allConfigurableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Type Parameters:
CTX- the generic type- Parameters:
aComponentExecutionStrategy- The strategy to use when initializing theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aContext- the contextaComponents- TheCollectioncontaining theComponentinstances 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 allConfigureExceptionComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Type Parameters:
CTX- the generic type- Parameters:
aComponentExecutionStrategy- The strategy to use when initializing theComponentinstances.aContext- the contextaComponents- TheCollectioncontaining theComponentinstances to initialize (in case them implement theConfigureExceptioninterface).- 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 allConfigureExceptionComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Type Parameters:
CTX- the generic type- Parameters:
aComponentExecutionStrategy- The strategy to use when initializing theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aContext- the contextaComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).- Throws:
ConfigureException- the configure exception
-
start
- Parameters:
aComponent- TheComponentto 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 allStartableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when starting theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to start (in case them implement theStartableinterface).- Throws:
StartException- in case initialization of at least oneStartableinstance failed.
-
start
public static void start(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) throws StartException Helper method for starting allStartableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when starting theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).- Throws:
StartException- in case initialization of at least oneStartableinstance failed.
-
start
@SafeVarargs public static void start(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) throws StartException Helper method for starting allStartableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when starting theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to start (in case them implement theStartableinterface).- Throws:
StartException- in case initialization of at least oneStartableinstance failed.
-
start
@SafeVarargs public static void start(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) throws StartException Helper method for starting allStartableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when starting theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).- Throws:
StartException- in case initialization of at least oneStartableinstance failed.
-
pause
- Parameters:
aComponent- TheComponentto 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 allPausableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when pausing theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to pause (in case them implement thePausableinterface).- Throws:
PauseException- in case initialization of at least onePausableinstance failed.
-
pause
public static void pause(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) throws PauseException Helper method for pausing allPausableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when pausing theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).- Throws:
PauseException- in case initialization of at least onePausableinstance failed.
-
pause
@SafeVarargs public static void pause(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) throws PauseException Helper method for pausing allPausableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when pausing theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to pause (in case them implement thePausableinterface).- Throws:
PauseException- in case initialization of at least onePausableinstance failed.
-
pause
@SafeVarargs public static void pause(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) throws PauseException Helper method for pausing allPausableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when pausing theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).- Throws:
PauseException- in case initialization of at least onePausableinstance failed.
-
resume
- Parameters:
aComponent- TheComponentto 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 allResumableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when resuming theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to resume (in case them implement theResumableinterface).- Throws:
ResumeException- in case initialization of at least oneResumableinstance failed.
-
resume
public static void resume(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) throws ResumeException Helper method for resuming allResumableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when resuming theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).- Throws:
ResumeException- in case initialization of at least oneResumableinstance failed.
-
resume
@SafeVarargs public static void resume(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) throws ResumeException Helper method for resuming allResumableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when resuming theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to resume (in case them implement theResumableinterface).- Throws:
ResumeException- in case initialization of at least oneResumableinstance failed.
-
resume
@SafeVarargs public static void resume(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) throws ResumeException Helper method for resuming allResumableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when resuming theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).- Throws:
ResumeException- in case initialization of at least oneResumableinstance failed.
-
stop
- Parameters:
aComponent- TheComponentto 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 allStoppableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when stoping theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to stop (in case them implement theStoppableinterface).- Throws:
StopException- in case initialization of at least oneStoppableinstance failed.
-
stop
public static void stop(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) throws StopException Helper method for stopping allStoppableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when stoping theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).- Throws:
StopException- in case initialization of at least oneStoppableinstance failed.
-
stop
@SafeVarargs public static void stop(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) throws StopException Helper method for stoping allStoppableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when stoping theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to stop (in case them implement theStoppableinterface).- Throws:
StopException- in case initialization of at least oneStoppableinstance failed.
-
stop
@SafeVarargs public static void stop(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) throws StopException Helper method for stoping allStoppableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when stoping theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).- Throws:
StopException- in case initialization of at least oneStoppableinstance failed.
-
destroy
Helper method, destroys the givenComponentin case it isDestroyable.- Parameters:
aComponent- TheComponentto destroy.
-
destroy
public static void destroy(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) Helper method for destroying allDestroyableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when destroying theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to destroy (in case them implement theDestroyableinterface).
-
destroy
public static void destroy(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) Helper method for destroying allDestroyableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when destroying theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances 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 allDestroyableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when destroying theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to destroy (in case them implement theDestroyableinterface).
-
destroy
@SafeVarargs public static void destroy(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) Helper method for destroying allDestroyableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when destroying theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).
-
decompose
Helper method, decomposes the givenComponentin case it isDecomposable.- Parameters:
aComponent- TheComponentto decompose.
-
decompose
public static void decompose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) Helper method for decomposing allDecomposableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when decomposing theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to decompose (in case them implement theDecomposableinterface).
-
decompose
public static void decompose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) Helper method for decomposing allDecomposableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when decomposing theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances 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 allDecomposableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when decomposing theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to decompose (in case them implement theDecomposableinterface).
-
decompose
@SafeVarargs public static void decompose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) Helper method for decomposing allDecomposableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when decomposing theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).
-
dispose
Helper method, disposes the givenComponentin case it isDisposable.- Parameters:
aComponent- TheComponentto dispose.
-
dispose
public static void dispose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) Helper method for decomposing allDisposableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when decomposing theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to dispose (in case them implement theDisposableinterface).
-
dispose
public static void dispose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) Helper method for decomposing allDisposableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when decomposing theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances 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 allDisposableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when decomposing theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to dispose (in case them implement theDisposableinterface).
-
dispose
@SafeVarargs public static void dispose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) Helper method for decomposing allDisposableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when decomposing theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).
-
flush
- Parameters:
aComponent- TheComponentto 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 allFlushableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when flushing theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to flush (in case them implement theFlushableinterface).- Throws:
IOException- in case initialization of at least oneFlushableinstance failed.
-
flush
public static void flush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) throws IOException Helper method for flushing allFlushableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when flushing theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).- Throws:
IOException- in case initialization of at least oneFlushableinstance failed.
-
flush
@SafeVarargs public static void flush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) throws IOException Helper method for flushing allFlushableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when flushing theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to flush (in case them implement theFlushableinterface).- Throws:
IOException- in case initialization of at least oneFlushableinstance failed.
-
flush
@SafeVarargs public static void flush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) throws IOException Helper method for flushing allFlushableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when flushing theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).- Throws:
IOException- in case initialization of at least oneFlushableinstance failed.
-
reset
Helper method, resets the givenComponentin case it isResetable.- Parameters:
aComponent- TheComponentto reset.
-
reset
public static void reset(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Collection<?> aComponents) Helper method for decomposing allResetableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when decomposing theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to reset (in case them implement theResetableinterface).
-
reset
public static void reset(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) Helper method for decomposing allResetableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when decomposing theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances 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 allResetableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when decomposing theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to reset (in case them implement theResetableinterface).
-
reset
@SafeVarargs public static void reset(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) Helper method for decomposing allResetableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when decomposing theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).
-
open
- Parameters:
aComponent- TheComponentto 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 allOpenableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when opening theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to open (in case them implement theOpenableinterface).- Throws:
IOException- in case initialization of at least oneOpenableinstance failed.
-
open
public static void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) throws IOException Helper method for opening allOpenableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when opening theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).- Throws:
IOException- in case initialization of at least oneOpenableinstance failed.
-
open
@SafeVarargs public static void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, Object... aComponents) throws IOException Helper method for opening allOpenableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when opening theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to open (in case them implement theOpenableinterface).- Throws:
IOException- in case initialization of at least oneOpenableinstance failed.
-
open
@SafeVarargs public static void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) throws IOException Helper method for opening allOpenableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when opening theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).- Throws:
IOException- in case initialization of at least oneOpenableinstance failed.
-
open
Helper method, configuring the givenComponentin case it isConnectionOpenable.- Type Parameters:
CON- the generic type- Parameters:
aComponent- TheComponentto 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 allConnectionOpenableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Type Parameters:
CON- the generic type- Parameters:
aComponentExecutionStrategy- The strategy to use when connecting theComponentinstances.aConnection- the connectionaComponents- TheCollectioncontaining theComponentinstances to connect (in case them implement theConnectionOpenableinterface).- Throws:
IOException- in case connecting of at least oneConnectionOpenableinstance failed.
-
open
public static <CON> void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, CON aConnection, Collection<?> aComponents) throws IOException Helper method for configuring allConnectionOpenableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Type Parameters:
CON- the generic type- Parameters:
aComponentExecutionStrategy- The strategy to use when connecting theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aConnection- the connectionaComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).- Throws:
IOException- in case connecting of at least oneConnectionOpenableinstance failed.
-
open
@SafeVarargs public static <CON> void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CON aConnection, Object... aComponents) throws IOException Helper method for configuring allConfigureExceptionComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Type Parameters:
CON- the generic type- Parameters:
aComponentExecutionStrategy- The strategy to use when connecting theComponentinstances.aConnection- the connectionaComponents- TheCollectioncontaining theComponentinstances to connect (in case them implement theConfigureExceptioninterface).- Throws:
IOException- in case connecting of at least oneConfigureExceptioninstance 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 allConfigureExceptionComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Type Parameters:
CON- the generic type- Parameters:
aComponentExecutionStrategy- The strategy to use when connecting theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aConnection- the connectionaComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).- Throws:
IOException- in case connecting of at least oneConfigureExceptioninstance failed.
-
open
public static <INPUT,OUTPUT> void open(Object aComponent, INPUT aInputConnection, OUTPUT aOutputConnection) throws IOException Helper method, configuring the givenComponentin case it isBidirectionalConnectionOpenable.- Type Parameters:
INPUT- the generic typeOUTPUT- the generic type- Parameters:
aComponent- TheComponentto 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 allBidirectionalConnectionOpenableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Type Parameters:
INPUT- the generic typeOUTPUT- the generic type- Parameters:
aComponentExecutionStrategy- The strategy to use when connecting theComponentinstances.aInputConnection- the input connectionaOutputConnection- the output connectionaComponents- TheCollectioncontaining theComponentinstances to connect (in case them implement theBidirectionalConnectionOpenableinterface).- Throws:
IOException- in case connecting of at least oneBidirectionalConnectionOpenableinstance 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 allBidirectionalConnectionOpenableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Type Parameters:
INPUT- the generic typeOUTPUT- the generic type- Parameters:
aComponentExecutionStrategy- The strategy to use when connecting theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aInputConnection- the input connectionaOutputConnection- the output connectionaComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).- Throws:
IOException- in case connecting of at least oneBidirectionalConnectionOpenableinstance 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 allConfigureExceptionComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Type Parameters:
INPUT- the generic typeOUTPUT- the generic type- Parameters:
aComponentExecutionStrategy- The strategy to use when connecting theComponentinstances.aInputConnection- the input connectionaOutputConnection- the output connectionaComponents- TheCollectioncontaining theComponentinstances to connect (in case them implement theConfigureExceptioninterface).- Throws:
IOException- in case connecting of at least oneConfigureExceptioninstance 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 allConfigureExceptionComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Type Parameters:
INPUT- the generic typeOUTPUT- the generic type- Parameters:
aComponentExecutionStrategy- The strategy to use when connecting theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aInputConnection- the input connectionaOutputConnection- the output connectionaComponents- TheCollectioncontaining theComponentinstances to process (in case them implement the required interface).- Throws:
IOException- in case connecting of at least oneConfigureExceptioninstance failed.
-
close
- Parameters:
aComponent- TheComponentto 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 allClosableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when decomposing theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to close (in case them implement theClosableinterface).
-
close
public static void close(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Collection<?> aComponents) Helper method for decomposing allClosableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when decomposing theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances 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 allClosableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy.- Parameters:
aComponentExecutionStrategy- The strategy to use when decomposing theComponentinstances.aComponents- TheCollectioncontaining theComponentinstances to close (in case them implement theClosableinterface).
-
close
@SafeVarargs public static void close(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, ExecutorService aExecutorService, Object... aComponents) Helper method for decomposing allClosableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Parameters:
aComponentExecutionStrategy- The strategy to use when decomposing theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aComponents- TheCollectioncontaining theComponentinstances 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 allInitializableComponentinstances found in the providedCollection. The strategy with which theComponentinstances are processed is defined with the providedExecutionStrategy. AnExecutorServicecan be provided in case some EJB container is to use a managedExecutorServiceprovided by an EJB server.- Type Parameters:
T- the generic type- Parameters:
aComponentExecutionStrategy- The strategy to use when initializing theComponentinstances.aExecutorService- TheExecutorServiceto use when creating threads, required in case anExecutionStrategy.PARALLELorExecutionStrategy.JOINis used.aCallableFactory- the callable factoryaComponents- TheCollectioncontaining theComponentinstances 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 oneComponentinstance failed.
-