@ComponentProfile(summary="A Collection of Workflows", tag="base") public final class WorkflowList extends java.util.AbstractCollection<Workflow> implements ComponentLifecycle, ComponentLifecycleExtension, java.util.List<Workflow>
Container for a collection of Workflow
s.
In the adapter configuration file this class is aliased as workflow-list which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
WorkflowList()
Creates a new instance.
|
WorkflowList(java.util.Collection<Workflow> workflows) |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
Workflow element) |
boolean |
add(Workflow element) |
boolean |
addAll(int index,
java.util.Collection<? extends Workflow> c) |
void |
addWorkflow(Workflow element)
Add a workflow.
|
void |
clear() |
void |
close()
Closes the component.
|
Workflow |
get(int index) |
WorkflowLifecycleStrategy |
getLifecycleStrategy() |
Workflow |
getWorkflow(java.lang.String uniqueId)
Get a workflow by its uniqueid.
|
java.util.List<Workflow> |
getWorkflows()
Returns a
List of Workflow s. |
int |
indexOf(java.lang.Object o) |
void |
init()
Initialises the component.
|
java.util.Iterator<Workflow> |
iterator() |
int |
lastIndexOf(java.lang.Object o) |
java.util.ListIterator<Workflow> |
listIterator() |
java.util.ListIterator<Workflow> |
listIterator(int index) |
void |
prepare()
Prepare for initialisation.
|
Workflow |
remove(int index) |
boolean |
remove(java.lang.Object o) |
boolean |
removeWorkflow(Workflow wf)
Remove a Workflow from this channel list.
|
Workflow |
set(int index,
Workflow element) |
void |
setLifecycleStrategy(WorkflowLifecycleStrategy wls)
Specify the strategy to use when handling individual workflow lifecycle.
|
void |
setWorkflows(java.util.List<Workflow> l)
Sets a
List of Workflow s. |
int |
size() |
void |
start()
Starts the component.
|
void |
stop()
Stop the component
|
java.util.List<Workflow> |
subList(int fromIndex,
int toIndex) |
addAll, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public WorkflowList()
Creates a new instance.
public WorkflowList(java.util.Collection<Workflow> workflows)
public void init() throws CoreException
ComponentLifecycle
Component initialisation includes config verification, creation of connections etc.
init
in interface ComponentLifecycle
CoreException
- wrapping any underlying Exception
sComponentLifecycle.init()
public void start() throws CoreException
ComponentLifecycle
Once a component is started it should be ready to process messages. In the case of AdaptrisMessageConsumer
, calling start
will begin message delivery.
start
in interface ComponentLifecycle
CoreException
- wrapping any underlying Exception
sComponentLifecycle.start()
public void stop()
ComponentLifecycle
A stopped component is not expected to be ready to process messages. In the case of AdaptrisMessageConsumer
, calling stop
will pause message delivery. Throwing a RuntimeException
may cause unintended consequences
stop
in interface ComponentLifecycle
ComponentLifecycle.stop()
public void close()
ComponentLifecycle
A closed component should release any connections it uses, etc. and clean up completely. Throwing a RuntimeException
may
cause unintended consequences
close
in interface ComponentLifecycle
ComponentLifecycle.close()
public void prepare() throws CoreException
ComponentLifecycleExtension
prepare
in interface ComponentLifecycleExtension
CoreException
public WorkflowLifecycleStrategy getLifecycleStrategy()
public void setLifecycleStrategy(WorkflowLifecycleStrategy wls)
If not explicitly specified, then DefaultWorkflowLifecycleStrategy
will be used to handle the workflow operations.
wls
- the strategy to setDefaultWorkflowLifecycleStrategy
public java.util.List<Workflow> getWorkflows()
Returns a List
of Workflow
s.
List
of Workflow
spublic void setWorkflows(java.util.List<Workflow> l)
Sets a List
of Workflow
s.
l
- a List
of Workflow
spublic void addWorkflow(Workflow element)
element
- the workflow to addadd(Workflow)
public int size()
public java.util.Iterator<Workflow> iterator()
public boolean remove(java.lang.Object o)
public boolean removeWorkflow(Workflow wf)
wf
- public boolean add(Workflow element)
public void add(int index, Workflow element)
add
in interface java.util.List<Workflow>
public boolean addAll(int index, java.util.Collection<? extends Workflow> c)
addAll
in interface java.util.List<Workflow>
public Workflow getWorkflow(java.lang.String uniqueId)
uniqueId
- the unique id of the workflowpublic int indexOf(java.lang.Object o)
indexOf
in interface java.util.List<Workflow>
public int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List<Workflow>
public void clear()
public java.util.ListIterator<Workflow> listIterator()
listIterator
in interface java.util.List<Workflow>
public java.util.ListIterator<Workflow> listIterator(int index)
listIterator
in interface java.util.List<Workflow>
public Workflow set(int index, Workflow element)
set
in interface java.util.List<Workflow>