|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Interface for building a response document. Note that implementations of this interface must be threadsafe.
A response document describes the results of an OGSA-DAI request. An instance
is assembled over a series of invocations of the various build
methods. The product is then retrievable using the
getResponseDocument method.
This is an example of the Builder design pattern. It separates the creation of response documents from the code that processes requests and allows different representations of response documents to be created.
| Method Summary | |
void |
buildError(java.lang.String name,
java.lang.Exception cause)
Assembles part of the response document describing an error that has occurred while processing part of a request. |
void |
buildRequestError(java.lang.String cause)
Assembles the part of the response document describing the status of a request that has failed due to an error. |
void |
buildRequestStatus(Status status)
Assembles the part of the response document describing the status of the request. |
void |
buildResult(java.lang.String name,
Status status,
byte[] data)
Assembles part of the response document describing the result of processing part of the request. |
org.w3c.dom.Document |
getResponseDocument()
Gets the assembled response document. |
| Method Detail |
public void buildRequestStatus(Status status)
status - the Status of the request
java.lang.IllegalArgumentException - if the status is nullpublic void buildRequestError(java.lang.String cause)
cause - the cause string for the error
java.lang.IllegalArgumentException - if the cause is null
public void buildResult(java.lang.String name,
Status status,
byte[] data)
name - the name associated with the resultstatus - the status of the resultdata - the result data. This may be null or an empty
String if the result contains no result data.
java.lang.IllegalArgumentException - if the name or status is null
public void buildError(java.lang.String name,
java.lang.Exception cause)
name - the name associated with the errorcause - the Exception that was raised by the error
java.lang.IllegalArgumentException - if the name or cause is nullpublic org.w3c.dom.Document getResponseDocument()
Document
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||