|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.xml_project.morganaxproc.filesystem.XProcHttpResponse
public class XProcHttpResponse
This class contains the response of a http-request done by the file system to be evaluated by p:http-request.
Field Summary | |
---|---|
static int |
HTTP_BAD_REQUEST
A constant for http status code "bad request" (400). |
static int |
HTTP_METHOD_NOT_ALLOWED
A constant for http status code "method not allowed" (405). |
static int |
HTTP_NOT_IMPLEMENTED
A constant for http status code "not implemented" (501). |
static int |
HTTP_OK
A constant for http status code "ok" (200). |
Constructor Summary | |
---|---|
XProcHttpResponse(nu.xom.Document doc,
java.lang.String encoding)
Creates a new XProcHttpResponse with the given XOM document as body and the given encoding. |
|
XProcHttpResponse(int statusCode)
Creates a new XProcHttpResponse with the given status code. |
|
XProcHttpResponse(int statusCode,
nu.xom.Document doc,
java.lang.String encoding)
Creates a new XProcHttpResponse with the given status code, the given XOM document as
body and the given encoding. |
|
XProcHttpResponse(int statusCode,
java.lang.String contentType,
java.lang.String encoding,
byte[] data)
Creates a new XProcHttpResponse with the given status code, the given data as
body, the given content type and the given encoding. |
Method Summary | |
---|---|
void |
addBody(HttpBody body)
Adds a body to the XProcHttpResponse. |
void |
addHeader(HttpHeader header)
Adds a header to the XProcHttpResponse. |
HttpBody[] |
getBodies()
Returns the bodies of this XProcHttpResponse. |
java.lang.String |
getContentType()
Returns the content type of this XProcHttpResponse. |
HttpHeader[] |
getHeaders()
Returns the headers of this XProcHttpResponse. |
int |
getStatusCode()
Returns the status code of this XProcHttpResponse. |
boolean |
isMultipart()
Checks whether this XProcHttpResponse has a multipart body. |
void |
setMultipart()
Flags the body of this XProcHttpResponse to be multipart. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int HTTP_OK
public static final int HTTP_BAD_REQUEST
public static final int HTTP_METHOD_NOT_ALLOWED
public static final int HTTP_NOT_IMPLEMENTED
Constructor Detail |
---|
public XProcHttpResponse(int statusCode)
XProcHttpResponse
with the given status code.
statusCode
- the status code.public XProcHttpResponse(nu.xom.Document doc, java.lang.String encoding)
XProcHttpResponse with the given XOM document as body and the given encoding.
- Parameters:
doc
- the document as body.encoding
- the encoding.
public XProcHttpResponse(int statusCode, nu.xom.Document doc, java.lang.String encoding)
XProcHttpResponse
with the given status code, the given XOM document as
body and the given encoding. The 'content-type' header is set to "application/xml".
statusCode
- the status code.doc
- the document as body.encoding
- the encoding.public XProcHttpResponse(int statusCode, java.lang.String contentType, java.lang.String encoding, byte[] data)
XProcHttpResponse
with the given status code, the given data as
body, the given content type and the given encoding.
statusCode
- the status codecontentType
- the content typeencoding
- the encodingdata
- the data as body.Method Detail |
---|
public void addHeader(HttpHeader header)
header
- the header to add.public void addBody(HttpBody body)
body
- the body to add.public void setMultipart()
public boolean isMultipart()
true if the body is multipart, otherwise false
.
public java.lang.String getContentType()
public final int getStatusCode()
public HttpHeader[] getHeaders()
public HttpBody[] getBodies()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |