Package org.refcodes.component
Class ComponentUtility
- java.lang.Object
-
- org.refcodes.component.ComponentUtility
-
public final class ComponentUtility extends java.lang.ObjectThe Class ComponentUtility.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclose(java.lang.Object aComponent)static voidclose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)static voidclose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)static voidclose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)static voidclose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)static voiddecompose(java.lang.Object aComponent)Helper method, decomposes the givenComponentin case it isDecomposeable.static voiddecompose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)Helper method for decomposing allDecomposeableComponentinstances found in the providedCollection.static voiddecompose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)Helper method for decomposing allDecomposeableComponentinstances found in the providedCollection.static voiddecompose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)Helper method for decomposing allDecomposeableComponentinstances found in the providedCollection.static voiddecompose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)Helper method for decomposing allDecomposeableComponentinstances found in the providedCollection.static voiddestroy(java.lang.Object aComponent)Helper method, destroys the givenComponentin case it isDestroyable.static voiddestroy(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)static voiddestroy(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)static voiddestroy(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)static voiddestroy(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)static voiddispose(java.lang.Object aComponent)Helper method, disposes the givenComponentin case it isDisposable.Disposedable.static voiddispose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)Helper method for decomposing allDisposable.DisposedableComponentinstances found in the providedCollection.static voiddispose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)Helper method for decomposing allDisposable.DisposedableComponentinstances found in the providedCollection.static voiddispose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)Helper method for decomposing allDisposable.DisposedableComponentinstances found in the providedCollection.static voiddispose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)Helper method for decomposing allDisposable.DisposedableComponentinstances found in the providedCollection.static <T> voidexecute(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, org.refcodes.component.ComponentUtility.CallableFactory<T> aCallableFactory, java.util.Collection<?> aComponents, java.lang.Object... aArguments)Helper method for initializing allInitializableComponentinstances found in the providedCollection.static voidflush(java.lang.Object aComponent)Helper method, flushs the givenComponentin case it isFlushable.static voidflush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)static voidflush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)static voidflush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)static voidflush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)static voidinitialize(java.lang.Object aComponent)Helper method, initializes the givenComponentin case it isInitializable.static <CTX> voidinitialize(java.lang.Object aComponent, CTX aContext)Helper method, configuring the givenComponentin case it isConfigurable.static <CTX> voidinitialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CTX aContext, java.lang.Object... aComponents)Helper method for configuring allConfigureExceptionComponentinstances found in the providedCollection.static <CTX> voidinitialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CTX aContext, java.util.Collection<?> aComponents)Helper method for configuring allConfigurableComponentinstances found in the providedCollection.static voidinitialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)Helper method for initializing allInitializableComponentinstances found in the providedCollection.static voidinitialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)Helper method for initializing allInitializableComponentinstances found in the providedCollection.static <CTX> voidinitialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, CTX aContext, java.lang.Object... aComponents)Helper method for configuring allConfigureExceptionComponentinstances found in the providedCollection.static <CTX> voidinitialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, CTX aContext, java.util.Collection<?> aComponents)Helper method for configuring allConfigurableComponentinstances found in the providedCollection.static voidinitialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)Helper method for initializing allInitializableComponentinstances found in the providedCollection.static voidinitialize(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)Helper method for initializing allInitializableComponentinstances found in the providedCollection.static voidopen(java.lang.Object aComponent)static <CON> voidopen(java.lang.Object aComponent, CON aConnection)Helper method, configuring the givenComponentin case it isConnectionOpenable.static <INPUT,OUTPUT>
voidopen(java.lang.Object aComponent, INPUT aInputConnection, OUTPUT aOutputConnection)Helper method, configuring the givenComponentin case it isBidirectionalConnectionOpenable.static <CON> voidopen(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CON aConnection, java.lang.Object... aComponents)Helper method for configuring allConfigureExceptionComponentinstances found in the providedCollection.static <CON> voidopen(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CON aConnection, java.util.Collection<?> aComponents)Helper method for configuring allConnectionOpenableComponentinstances found in the providedCollection.static <INPUT,OUTPUT>
voidopen(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, INPUT aInputConnection, OUTPUT aOutputConnection, java.lang.Object... aComponents)Helper method for configuring allConfigureExceptionComponentinstances found in the providedCollection.static <INPUT,OUTPUT>
voidopen(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, INPUT aInputConnection, OUTPUT aOutputConnection, java.util.Collection<?> aComponents)Helper method for configuring allBidirectionalConnectionOpenableComponentinstances found in the providedCollection.static voidopen(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)static voidopen(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)static <CON> voidopen(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, CON aConnection, java.lang.Object... aComponents)Helper method for configuring allConfigureExceptionComponentinstances found in the providedCollection.static <CON> voidopen(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, CON aConnection, java.util.Collection<?> aComponents)Helper method for configuring allConnectionOpenableComponentinstances found in the providedCollection.static <INPUT,OUTPUT>
voidopen(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, INPUT aInputConnection, OUTPUT aOutputConnection, java.lang.Object... aComponents)Helper method for configuring allConfigureExceptionComponentinstances found in the providedCollection.static <INPUT,OUTPUT>
voidopen(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, INPUT aInputConnection, OUTPUT aOutputConnection, java.util.Collection<?> aComponents)Helper method for configuring allBidirectionalConnectionOpenableComponentinstances found in the providedCollection.static voidopen(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)static voidopen(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)static voidpause(java.lang.Object aComponent)static voidpause(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)static voidpause(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)static voidpause(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)static voidpause(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)static voidreset(java.lang.Object aComponent)static voidreset(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)static voidreset(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)static voidreset(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)static voidreset(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)static voidresume(java.lang.Object aComponent)static voidresume(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)static voidresume(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)static voidresume(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)static voidresume(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)static voidstart(java.lang.Object aComponent)static voidstart(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)static voidstart(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)static voidstart(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)static voidstart(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)static voidstop(java.lang.Object aComponent)static voidstop(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents)static voidstop(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)static voidstop(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)static voidstop(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)
-
-
-
Method Detail
-
initialize
public static void initialize(java.lang.Object aComponent) throws InitializeExceptionHelper 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, java.util.Collection<?> aComponents) throws InitializeExceptionHelper 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, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents) throws InitializeExceptionHelper 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, java.lang.Object... aComponents) throws InitializeExceptionHelper 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, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents) throws InitializeExceptionHelper 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
public static <CTX> void initialize(java.lang.Object aComponent, CTX aContext) throws InitializeExceptionHelper 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, java.util.Collection<?> aComponents) throws ConfigureExceptionHelper 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, java.util.concurrent.ExecutorService aExecutorService, CTX aContext, java.util.Collection<?> aComponents) throws ConfigureExceptionHelper 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, java.lang.Object... aComponents) throws ConfigureExceptionHelper 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, java.util.concurrent.ExecutorService aExecutorService, CTX aContext, java.lang.Object... aComponents) throws ConfigureExceptionHelper 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
public static void start(java.lang.Object aComponent) throws StartException- Parameters:
aComponent- TheComponentto start.- Throws:
StartException- Thrown in case initialization failed.
-
start
public static void start(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents) throws StartExceptionHelper 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, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents) throws StartExceptionHelper 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, java.lang.Object... aComponents) throws StartExceptionHelper 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, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents) throws StartExceptionHelper 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
public static void pause(java.lang.Object aComponent) throws PauseException- Parameters:
aComponent- TheComponentto pause.- Throws:
PauseException- Thrown in case initialization failed.
-
pause
public static void pause(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents) throws PauseExceptionHelper 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, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents) throws PauseExceptionHelper 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, java.lang.Object... aComponents) throws PauseExceptionHelper 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, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents) throws PauseExceptionHelper 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
public static void resume(java.lang.Object aComponent) throws ResumeException- Parameters:
aComponent- TheComponentto resume.- Throws:
ResumeException- Thrown in case initialization failed.
-
resume
public static void resume(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents) throws ResumeExceptionHelper 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, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents) throws ResumeExceptionHelper 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, java.lang.Object... aComponents) throws ResumeExceptionHelper 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, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents) throws ResumeExceptionHelper 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
public static void stop(java.lang.Object aComponent) throws StopException- Parameters:
aComponent- TheComponentto stop.- Throws:
StopException- Thrown in case initialization failed.
-
stop
public static void stop(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents) throws StopExceptionHelper 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, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents) throws StopExceptionHelper 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, java.lang.Object... aComponents) throws StopExceptionHelper 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, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents) throws StopExceptionHelper 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
public static void destroy(java.lang.Object aComponent)
Helper method, destroys the givenComponentin case it isDestroyable.- Parameters:
aComponent- TheComponentto destroy.
-
destroy
public static void destroy(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.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, java.util.concurrent.ExecutorService aExecutorService, java.util.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, java.lang.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, java.util.concurrent.ExecutorService aExecutorService, java.lang.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
public static void decompose(java.lang.Object aComponent)
Helper method, decomposes the givenComponentin case it isDecomposeable.- Parameters:
aComponent- TheComponentto decompose.
-
decompose
public static void decompose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)Helper method for decomposing allDecomposeableComponentinstances 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 theDecomposeableinterface).
-
decompose
public static void decompose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)Helper method for decomposing allDecomposeableComponentinstances 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, java.lang.Object... aComponents)Helper method for decomposing allDecomposeableComponentinstances 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 theDecomposeableinterface).
-
decompose
@SafeVarargs public static void decompose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)Helper method for decomposing allDecomposeableComponentinstances 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
public static void dispose(java.lang.Object aComponent)
Helper method, disposes the givenComponentin case it isDisposable.Disposedable.- Parameters:
aComponent- TheComponentto dispose.
-
dispose
public static void dispose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)
-
dispose
public static void dispose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents)Helper method for decomposing allDisposable.DisposedableComponentinstances 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, java.lang.Object... aComponents)
-
dispose
@SafeVarargs public static void dispose(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents)Helper method for decomposing allDisposable.DisposedableComponentinstances 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
public static void flush(java.lang.Object aComponent) throws OpenExceptionHelper method, flushs the givenComponentin case it isFlushable.- Parameters:
aComponent- TheComponentto flush.- Throws:
OpenException- Thrown in case initialization failed.
-
flush
public static void flush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents) throws OpenExceptionHelper 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:
OpenException- in case initialization of at least oneFlushableinstance failed.
-
flush
public static void flush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents) throws OpenExceptionHelper 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:
OpenException- in case initialization of at least oneFlushableinstance failed.
-
flush
@SafeVarargs public static void flush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents) throws OpenExceptionHelper 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:
OpenException- in case initialization of at least oneFlushableinstance failed.
-
flush
@SafeVarargs public static void flush(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents) throws OpenExceptionHelper 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:
OpenException- in case initialization of at least oneFlushableinstance failed.
-
reset
public static void reset(java.lang.Object aComponent)
- Parameters:
aComponent- TheComponentto reset.
-
reset
public static void reset(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)
-
reset
public static void reset(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.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, java.lang.Object... aComponents)
-
reset
@SafeVarargs public static void reset(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.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
public static void open(java.lang.Object aComponent) throws OpenException- Parameters:
aComponent- TheComponentto open.- Throws:
OpenException- Thrown in case initialization failed.
-
open
public static void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents) throws OpenExceptionHelper 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:
OpenException- in case initialization of at least oneOpenableinstance failed.
-
open
public static void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.Collection<?> aComponents) throws OpenExceptionHelper 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:
OpenException- in case initialization of at least oneOpenableinstance failed.
-
open
@SafeVarargs public static void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.lang.Object... aComponents) throws OpenExceptionHelper 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:
OpenException- in case initialization of at least oneOpenableinstance failed.
-
open
@SafeVarargs public static void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.Object... aComponents) throws OpenExceptionHelper 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:
OpenException- in case initialization of at least oneOpenableinstance failed.
-
open
public static <CON> void open(java.lang.Object aComponent, CON aConnection) throws OpenExceptionHelper method, configuring the givenComponentin case it isConnectionOpenable.- Type Parameters:
CON- the generic type- Parameters:
aComponent- TheComponentto configure.aConnection- the connection- Throws:
OpenException- Thrown in case connecting failed.
-
open
public static <CON> void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CON aConnection, java.util.Collection<?> aComponents) throws OpenExceptionHelper 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:
OpenException- in case connecting of at least oneConnectionOpenableinstance failed.
-
open
public static <CON> void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, CON aConnection, java.util.Collection<?> aComponents) throws OpenExceptionHelper 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:
OpenException- in case connecting of at least oneConnectionOpenableinstance failed.
-
open
@SafeVarargs public static <CON> void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, CON aConnection, java.lang.Object... aComponents) throws OpenExceptionHelper 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:
OpenException- in case connecting of at least oneConfigureExceptioninstance failed.
-
open
@SafeVarargs public static <CON> void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, CON aConnection, java.lang.Object... aComponents) throws OpenExceptionHelper 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:
OpenException- in case connecting of at least oneConfigureExceptioninstance failed.
-
open
public static <INPUT,OUTPUT> void open(java.lang.Object aComponent, INPUT aInputConnection, OUTPUT aOutputConnection) throws OpenExceptionHelper 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:
OpenException- Thrown in case connecting failed.
-
open
public static <INPUT,OUTPUT> void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, INPUT aInputConnection, OUTPUT aOutputConnection, java.util.Collection<?> aComponents) throws OpenExceptionHelper 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:
OpenException- in case connecting of at least oneBidirectionalConnectionOpenableinstance failed.
-
open
public static <INPUT,OUTPUT> void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, INPUT aInputConnection, OUTPUT aOutputConnection, java.util.Collection<?> aComponents) throws OpenExceptionHelper 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:
OpenException- 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, java.lang.Object... aComponents) throws OpenExceptionHelper 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:
OpenException- in case connecting of at least oneConfigureExceptioninstance failed.
-
open
@SafeVarargs public static <INPUT,OUTPUT> void open(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, INPUT aInputConnection, OUTPUT aOutputConnection, java.lang.Object... aComponents) throws OpenExceptionHelper 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:
OpenException- in case connecting of at least oneConfigureExceptioninstance failed.
-
close
public static void close(java.lang.Object aComponent) throws CloseException- Parameters:
aComponent- TheComponentto close.- Throws:
CloseException- Thrown in case closing or pre-closing (flushing) fails.
-
close
public static void close(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.Collection<?> aComponents)
-
close
public static void close(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.util.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, java.lang.Object... aComponents)
-
close
@SafeVarargs public static void close(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, java.util.concurrent.ExecutorService aExecutorService, java.lang.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, java.util.concurrent.ExecutorService aExecutorService, org.refcodes.component.ComponentUtility.CallableFactory<T> aCallableFactory, java.util.Collection<?> aComponents, java.lang.Object... aArguments) throws java.lang.ExceptionHelper 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 special cases.- Throws:
java.lang.Exception- in case processing of at least oneComponentinstance failed.
-
-