|
|||||||||||
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.Throwable 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(ProcessingStatus status) Assembles the part of the response document describing the status of the request. |
void |
buildResult(java.lang.String name, ProcessingStatus status, byte[] data) Assembles part of the response document describing the result of processing part 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. |
void |
buildSessionDetails(Session session) Assembles the part of the response document identifying the session that the request was joined to. |
Method Detail |
public void buildSessionDetails(Session session)
session
- Session the request was joined tojava.lang.IllegalArgumentException
- If the session is null
public void buildRequestStatus(ProcessingStatus status)
status
- Request status.java.lang.IllegalArgumentException
- If the status is null
public void buildRequestError(java.lang.String cause)
cause
- Name of the cause of the failue e.g. an activity name.java.lang.IllegalArgumentException
- If the cause is null
public void buildResult(java.lang.String name, ProcessingStatus status, byte[] data)
name
- The name associated with the resultstatus
- The status of the result.data
- The result data. This may be null
or an empty String
if the result contains no result data.java.lang.IllegalArgumentException
- If name
or status
are null
public void buildResult(java.lang.String name, Status status, byte[] data)
name
- The name associated with the resultstatus
- The status of the result.data
- The result data. This may be null
or an empty array if the result contains no result data.java.lang.IllegalArgumentException
- If name
or status
are null
public void buildError(java.lang.String name, java.lang.Throwable cause)
name
- The name associated with the resultcause
- Cause of the error.java.lang.IllegalArgumentException
- If name
or cause
are null
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |