|
|||||||||||
| 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.
CompositeRequestComponent| 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(EngineConfiguration config,
RequestContext context,
ResponseBuilder responseBuilder)
Initialises the component. |
void |
process(EngineConfiguration config,
RequestContext context,
ResponseBuilder responseBuilder)
Processes the component. |
void |
terminate()
Terminates the processing of the request component. |
| Method Detail |
public void initialise(EngineConfiguration config,
RequestContext context,
ResponseBuilder responseBuilder)
throws RequestSystemException,
RequestUserException
generatesResultData method must operational.
config - the configuration object for the engine that will process
this request componentcontext - the context for the requestresponseBuilder - the response builder for assembling the response document
RequestSystemException - if there is a system problem during initialisation.
RequestUserException - if there is a user problem during initialisation.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 otherwise
public void process(EngineConfiguration config,
RequestContext context,
ResponseBuilder responseBuilder)
throws RequestSystemException,
RequestUserException
terminate
method by another thread. Hence, when this method returns processing will
be either complete or terminated.
config - the configuration object for the engine that is processing
this request componentcontext - the context for the requestresponseBuilder - the response builder for assembling the response document
during processing
RequestSystemException - if there is a system problem initialising or processing the
request.
RequestUserException - if there is a user problem initialising or processing the
request.public void terminate()
public void add(RequestComponent child)
child - the child RequestComponentpublic 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 | ||||||||||