C
- The type of the Component
supported by the
CompositeComponentImpl
.public 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 Modifier and Type | Class and Description |
---|---|
static class |
CompositeComponentImpl.ExtendedCompositeComponentImpl<C extends Component,CTX,CON>
The
CompositeComponentImpl.ExtendedCompositeComponentImpl is an implementation of the
ExtendedCompositeComponent . |
CompositeComponent.ExtendedCompositeComponent<CTX,CON>
LifeCycleComponent.LifeCycleAutomaton
Initializeable.InitializeAutomaton
Startable.StartAutomaton
Pausable.PauseAutomaton
Resumable.ResumeAutomaton
Stoppable.StopAutomaton
Destroyable.DestroyAutomaton
DeviceComponent.DeviceAutomaton
Openable.OpenAutomaton
Closable.CloseAutomaton
Decomposeable.DecomposeAutomaton
Constructor and 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.consts.ExecutionStrategy aStrategy,
C... aComponents)
Creates a
CompositeComponentImpl containing the provided
components. |
CompositeComponentImpl(org.refcodes.controlflow.consts.ExecutionStrategy aStrategy,
Collection<C> aComponents)
Creates a
CompositeComponentImpl containing the provided
components. |
Modifier and Type | Method and 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.consts.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.
|
public 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.consts.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.consts.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 IOException
flush
in interface Flushable
IOException
public void decompose()
decompose
in interface Decomposeable
public 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 Destroyable
public void stop() throws StopException
stop
in interface Stoppable
StopException
- Thrown in case stopping fails.public void resume() throws ResumeException
resume
in interface Resumable
ResumeException
- Thrown in case resuming fails.public void pause() throws PauseException
pause
in interface Pausable
PauseException
- in case pausing fails.public void start() throws StartException
start
in interface Startable
StartException
- Thrown in case starting fails.public void initialize() throws InitializeException
initialize
in interface Initializeable
InitializeException
- Thrown in case initializing fails.public void reset()
public void open() throws OpenException
open
in interface Openable
OpenException
- Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.public void close()
Destroyable.destroy()
method, which must not throw
any exception as well.public void dispose()
dispose
in interface org.refcodes.mixin.mixins.Disposable
protected org.refcodes.controlflow.consts.ExecutionStrategy getExecutionStrategy()
ExecutionStrategy
.ExecutionStrategy
being set.Copyright © 2015. All rights reserved.