|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--juju.reattore.protocol.http.impl.BaseHttpResponse
Basic HTTP response implementation.
Field Summary |
Fields inherited from interface juju.reattore.protocol.http.HttpResponse |
SC_FORBIDDEN, SC_INTERNAL_SERVER_ERROR, SC_MOVED_PERMANENTLY, SC_NOT_FOUND, SC_OK |
Constructor Summary | |
BaseHttpResponse()
|
Method Summary | |
ByteSource |
getBody()
Gets the source to read the body from. |
java.lang.String |
getHeader(java.lang.String key)
Gets a header line. |
java.util.Set |
getHeaders()
Gets all headers as a set of Map.Entry items. |
int |
getNumHeaders()
Gets the number of parsed headers not including the start line. |
int |
getStatus()
Gets the response status. |
void |
setBody(ByteSource to)
Sets the source to read the body from. |
void |
setHeader(java.lang.String name,
java.lang.String value)
Sets a header. |
void |
setStatus(int to)
Sets the response status. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BaseHttpResponse()
Method Detail |
public int getStatus()
HttpResponse
getStatus
in interface HttpResponse
HttpResponse
public void setStatus(int to)
HttpResponse
setStatus
in interface HttpResponse
to
- One of the SC_* constants.HttpResponse
public void setBody(ByteSource to)
HttpResponse
setBody
in interface HttpResponse
to
- The source.HttpResponse
public ByteSource getBody()
HttpResponse
getBody
in interface HttpResponse
HttpResponse
public void setHeader(java.lang.String name, java.lang.String value)
HttpResponse
setHeader
in interface HttpResponse
name
- One of HttpConstants.*value
- The value to use.HttpResponse
public int getNumHeaders()
HttpMessage
getNumHeaders
in interface HttpMessage
HttpResponse
public java.lang.String getHeader(java.lang.String key)
HttpMessage
getHeader
in interface HttpMessage
key
- The header to get.
HttpResponse
public java.util.Set getHeaders()
HttpMessage
getHeaders
in interface HttpMessage
HttpMessage
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |