C - The type of the Component supported by the
CompositeComponentImpl.Flushable, Closable, CompositeComponent, Decomposeable, Destroyable, Flushable, Initializable, LifeCycleComponent, LinkComponent, Openable, Pausable, Resetable, Resumable, Startable, Stoppable, org.refcodes.mixin.DisposableCompositeComponentImpl.ExtendedCompositeComponentImplpublic class CompositeComponentImpl<C extends Component> extends Object implements CompositeComponent
CompositeComponentImpl is an implementation of the
CompositeComponent. To make sure that the state change requests you
require are supported by the managed Component instances, specify the
according type C as generic type argument.| Modifier and Type | Class | Description |
|---|---|---|
static class |
CompositeComponentImpl.ExtendedCompositeComponentImpl<C extends Component,CTX,CON> |
The
CompositeComponentImpl.ExtendedCompositeComponentImpl is an implementation of the
CompositeComponent.ExtendedCompositeComponent. |
Closable.CloseAutomaton, Closable.CloseBuilder<B extends Closable.CloseBuilder<B>>CompositeComponent.ExtendedCompositeComponent<CTX,CON>Decomposeable.DecomposeAutomatonDestroyable.DestroyAutomatonorg.refcodes.mixin.Disposable.DisposedableFlushable.FlushBuilder<B extends Flushable.FlushBuilder<B>>Initializable.InitializeAutomaton, Initializable.InitializeBuilder<B extends Initializable.InitializeBuilder<B>>, Initializable.UncheckedInitializableLifeCycleComponent.LifeCycleAutomaton, LifeCycleComponent.UncheckedLifeCycleComponentLinkComponent.LinkAutomaton, LinkComponent.LinkComponentBuilder<B extends LinkComponent.LinkComponentBuilder<B>>Openable.OpenAutomaton, Openable.OpenBuilder<B extends Openable.OpenBuilder<B>>Pausable.PauseAutomaton, Pausable.PauseBuilder<B extends Pausable.PauseBuilder<B>>, Pausable.UncheckedPausableResumable.ResumeAutomaton, Resumable.ResumeBuilder<B extends Resumable.ResumeBuilder<B>>, Resumable.UncheckedResumableStartable.StartAutomaton, Startable.StartBuilder<B extends Startable.StartBuilder<B>>, Startable.UncheckedStartableStoppable.StopAutomaton, Stoppable.StopBuilder<B extends Stoppable.StopBuilder<B>>, Stoppable.UncheckedStoppable| Constructor | Description |
|---|---|
CompositeComponentImpl(C... aComponents) |
Creates a
CompositeComponentImpl containing the provided
components. |
CompositeComponentImpl(Collection<C> aComponents) |
Creates a
CompositeComponentImpl containing the provided
components. |
CompositeComponentImpl(org.refcodes.controlflow.ExecutionStrategy aStrategy,
C... aComponents) |
Creates a
CompositeComponentImpl containing the provided
components. |
CompositeComponentImpl(org.refcodes.controlflow.ExecutionStrategy aStrategy,
Collection<C> aComponents) |
Creates a
CompositeComponentImpl containing the provided
components. |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Closes the component's connection(s).
|
void |
decompose() |
Decomposes the component.
|
void |
destroy() |
Destroys the component.
|
void |
dispose() |
|
void |
flush() |
|
protected Set<C> |
getComponents() |
Provides access to the
Component instances. |
protected org.refcodes.controlflow.ExecutionStrategy |
getExecutionStrategy() |
Provides access to the
ExecutionStrategy. |
void |
initialize() |
Initialize the component.
|
void |
open() |
Open the component's connection(s).
|
void |
pause() |
Pauses the component.
|
void |
reset() |
Resets the component.
|
void |
resume() |
Resumes the component.
|
void |
start() |
Starts the component.
|
void |
stop() |
Stops the component.
|
closeIn, closeQuietly, closeUncheckedflushUnchecked, isFlushableinitializeUncheckedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitopenUncheckedpauseUncheckedresumeUncheckedstartUncheckedstopUncheckedpublic CompositeComponentImpl(Collection<C> aComponents)
CompositeComponentImpl containing the provided
components. The ExecutionStrategy.JOIN ExecutionStrategy
is used by default.aComponents - The components to be managed by the
CompositeComponentImpl.public CompositeComponentImpl(org.refcodes.controlflow.ExecutionStrategy aStrategy,
Collection<C> aComponents)
CompositeComponentImpl containing the provided
components.aStrategy - The ExecutionStrategy for executing the state
change requests.aComponents - The components to be managed by the
CompositeComponentImpl.@SafeVarargs public CompositeComponentImpl(C... aComponents)
CompositeComponentImpl containing the provided
components. The ExecutionStrategy.JOIN ExecutionStrategy
is used by default.aComponents - The components to be managed by the
CompositeComponentImpl.@SafeVarargs public CompositeComponentImpl(org.refcodes.controlflow.ExecutionStrategy aStrategy, C... aComponents)
CompositeComponentImpl containing the provided
components.aStrategy - The ExecutionStrategy for executing the state
change requests.aComponents - The components to be managed by the
CompositeComponentImpl.public void flush()
throws OpenException
flush in interface Flushableflush in interface FlushableOpenExceptionpublic void decompose()
decompose in interface Decomposeablepublic void destroy()
Component has been destroyed, then invoking any of that
Component instance's methods (except the Destroyable.destroy()
method) must throw an IllegalStateException as by definition a
once destroyed Component is in the state of being destroyed which
is irreversible.destroy in interface Destroyablepublic void stop()
throws StopException
stop in interface StoppableStopException - Thrown in case stopping fails.public void resume()
throws ResumeException
resume in interface ResumableResumeException - Thrown in case resuming fails.public void pause()
throws PauseException
pause in interface PausablePauseException - in case pausing fails.public void start()
throws StartException
start in interface StartableStartException - Thrown in case starting fails.public void initialize()
throws InitializeException
initialize in interface InitializableInitializeException - Thrown in case initializing fails.public void reset()
public void open()
throws OpenException
open in interface OpenableOpenException - Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.public void close()
CloseException as
upon close we may have to do things like flushing buffers which can fail
(and would otherwise fail unhandled or even worse unnoticed).public void dispose()
dispose in interface org.refcodes.mixin.Disposableprotected org.refcodes.controlflow.ExecutionStrategy getExecutionStrategy()
ExecutionStrategy.ExecutionStrategy being set.Copyright © 2018. All rights reserved.