|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the interface that the RequestEngine
uses for
processing requests without concerning itself with the
implementation. After the process
method had been
invoked, the response document becomes available via the
getResponse
method. Note that this does not guarantee
that the request processing is complete. See the method comments
for more details.
Method Summary | |
ProcessingStatus |
getStatus()
Obtains the processing status of the request. |
void |
initialise(EngineConfiguration config,
RequestContext context,
ResponseBuilder builder)
Initialises this request before its processing can commence. |
void |
process()
Initiates the processing of the request. |
void |
terminate()
Terminates the request. |
void |
waitForResponse()
Waits for the response building to complete. |
Methods inherited from interface uk.org.ogsadai.sessions.SessionParticipant |
getSession, getSessionStrategy, setSession |
Method Detail |
public void initialise(EngineConfiguration config, RequestContext context, ResponseBuilder builder) throws java.lang.IllegalStateException, RequestSpecificationException, RequestExecutionException
Initialisation may be performed once only, prior to invoking
any of the other methods on the Request
interface.
java.lang.IllegalStateException
- If invoked after the processing of the request has been
initiated or terminated.
RequestSpecificationException
- if the request fails to execute due to a problem in the
request e.g. it specifies an unsupported activity or a
query expression is has incorrect syntax.
RequestExecutionException
- if the request fails to execute due to a problem in the
e.g. a database connection disappears or a file is
corrupted.public void process() throws java.lang.IllegalStateException
ResponseBuilder
passed into the
process
method.
All implementations of this method must ensure that processing is a non-blocking operation; e.g., by delegating the actual processing to a separate thread. This method should return as soon as processing is suitably initiated and should not wait until processing completes.
java.lang.IllegalStateException
- if invoked before the request has been initialised, or after
processing has commenced, completed or terminated.public void waitForResponse()
ResponseBuilder
. This may or may not indicate that
the request processing is complete, depending on the type of
request. For example some requests produce no response data, so
the response may be available before processing completes.
public void terminate()
public ProcessingStatus getStatus()
ProcessingStatus
object.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |