uk.org.ogsadai.engine.controlflow
Class CompositeRequestComponent
java.lang.Object
|
+--uk.org.ogsadai.engine.controlflow.CompositeRequestComponent
- All Implemented Interfaces:
- RequestComponent
- Direct Known Subclasses:
- FlowRequestComponent, SequenceRequestComponent
- public abstract class CompositeRequestComponent
- extends java.lang.Object
- implements RequestComponent
A CompositeRequestComponent
is a RequestComponent
that may contain child components. The iterator
method is defined to provide access to these children for a concrete implementation.
- Author:
- The OGSA-DAI Project Team
Field Summary |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private static DAILogger |
LOG
Logger object for logging in this class |
private java.util.List |
mChildren
The child components. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPYRIGHT_NOTICE
private static final java.lang.String COPYRIGHT_NOTICE
-
Copyright statement
- See Also:
- Constant Field Values
LOG
private static final DAILogger LOG
-
Logger object for logging in this class
mChildren
private final java.util.List mChildren
-
The child components.
CompositeRequestComponent
public CompositeRequestComponent()
add
public void add(RequestComponent child)
- Description copied from interface:
RequestComponent
-
Adds a child to a composite component. Note that an empty implementation of this method should be provided for any leaf components.
-
- Specified by:
add
in interface RequestComponent
-
- Parameters:
child
- The child RequestComponent
children
public java.util.List children()
- Description copied from interface:
RequestComponent
-
Returns a non-mutable list of the children of this
RequestComponent
. If this component is a leaf and not a composite then java.util.Collections.EMPTY_LIST
should be returned.
-
- Specified by:
children
in interface RequestComponent
-
- Returns:
- a
java.util.List
containing any children.
initialise
public void initialise(ActivityContext context,
Session session,
ResponseBuilder responseBuilder)
throws RequestSpecificationException,
RequestExecutionException
- Description copied from interface:
RequestComponent
-
Initialises the component. After this method has been returned the
generatesResultData
method must operational.
-
- Specified by:
initialise
in interface RequestComponent
-
- Parameters:
context
- The context for the request
session
- The session for the request
responseBuilder
- The response builder for assembling the response document
- Throws:
RequestSpecificationException
- If there is an initialisation problem caused by incorrect information in the request.
RequestExecutionException
- If a problem occurs during initialisation that is not caused by incorrect information in the request.
generatesResultData
public boolean generatesResultData()
- Description copied from interface:
RequestComponent
-
Indicates whether or not this component will generate any result data. This can only be invoked after the
initialise
method has returned. This method is used by the engine to determine whether to process a request synchronously or asynchronously.
-
- Specified by:
generatesResultData
in interface RequestComponent
-
- Returns:
true
if so, false
otherwise