|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uk.org.ogsadai.engine.ActivityPipelineRequestComponent
A RequestComponent that consists of an activity or a pipeline
of connected activities. In the case of a pipeline of activities, the
activities will be processed simultaneously, with data streaming from one end
of the pipeline to the other when the process method is invoked.
| Constructor Summary | |
ActivityPipelineRequestComponent()
Constructs an ActivityPipelineRequestComponent. |
|
| Method Summary | |
void |
add(RequestComponent child)
Adds a child to a composite component. |
void |
addActivity(Activity activity)
Adds the specified activity to this activity pipeline. |
java.util.List |
children()
Since this is a leaf RequestComponent this method returns
an empty java.util.Iterator. |
boolean |
containsActivity(java.lang.String activityName)
Returns true if the specified activity is contained in this pipeline. |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ActivityPipelineRequestComponent()
ActivityPipelineRequestComponent. The
activities contained in the pipeline are added using repeated invocations
of the addActivity method.
| Method Detail |
public void initialise(EngineConfiguration config,
RequestContext context,
ResponseBuilder responseBuilder)
throws RequestSystemException,
RequestUserException
RequestComponentgeneratesResultData method must operational.
initialise in interface RequestComponentconfig - 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
RequestUserException - if there is a user problem during initialisation.
RequestSystemException - if there is a system problem during initialisation.
public void process(EngineConfiguration config,
RequestContext context,
ResponseBuilder responseBuilder)
throws RequestSystemException,
RequestUserException
RequestComponentterminate
method by another thread. Hence, when this method returns processing will
be either complete or terminated.
process in interface RequestComponentconfig - 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 add(RequestComponent child)
RequestComponent
add in interface RequestComponentchild - the child RequestComponentpublic java.util.List children()
RequestComponent this method returns
an empty java.util.Iterator.
children in interface RequestComponentjava.util.List containing any childrenRequestComponent.children()public void addActivity(Activity activity)
activity - the Activity to add to this pipelinepublic boolean containsActivity(java.lang.String activityName)
activityName - the name of the activity
true if the activity is contained in the pipeline,
false otherwisepublic boolean generatesResultData()
RequestComponentinitialise method has
returned. This method is used by the Engine to determine whether to
process a request synchronously or asynchronously.
generatesResultData in interface RequestComponenttrue if so, false otherwisepublic void terminate()
RequestComponent
terminate in interface RequestComponent
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||