|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A RequestComponent
represents a part or the whole of an OGSA-DAI request. It declares an interfact through which the component can be initialised and processed. Implementations must be thread safe because one thread may invoke the terminate
method while another is running the process
method.
This class is an example of the Composite design pattern and its interface declares methods for adding and retrieving child components.
Method Summary | |
void |
add(RequestComponent child) Adds a child to a composite component. |
java.util.List |
children() Returns a non-mutable list of the children of this RequestComponent . |
boolean |
generatesResultData() Indicates whether or not this component will generate any result data. |
void |
initialise(ActivityContext context, Session session, ResponseBuilder responseBuilder) Initialises the component. |
void |
process(ActivityContext context, ResponseBuilder responseBuilder) Processes the component. |
void |
terminate() Terminates the processing of the request component. |
Method Detail |
public void initialise(ActivityContext context, Session session, ResponseBuilder responseBuilder) throws RequestSpecificationException, RequestExecutionException
generatesResultData
method must operational.
context
- The context for the requestsession
- The session for the requestresponseBuilder
- The response builder for assembling the response documentRequestSpecificationException
- 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.public boolean generatesResultData()
initialise
method has returned. This method is used by the engine to determine whether to process a request synchronously or asynchronously.
true
if so, false
otherwisepublic void process(ActivityContext context, ResponseBuilder responseBuilder) throws RequestSpecificationException, RequestExecutionException
terminate
method by another thread. Hence, when this method returns processing will be either complete or terminated.
context
- The context for the requestresponseBuilder
- The response builder for assembling the response document during processingRequestSpecificationException
- If there is a processing problem caused by incorrect information in the request.RequestExecutionException
- If a problem occurs during processing that is not caused by incorrect information in the request.public void terminate()
public void add(RequestComponent child)
child
- The child RequestComponent
public java.util.List children()
RequestComponent
. If this component is a leaf and not a composite then java.util.Collections.EMPTY_LIST
should be returned.
java.util.List
containing any children.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |