public interface WebResponse
| Modifier and Type | Method and Description |
|---|---|
boolean |
end()
Completes the asynchronous operation that was started on the request.
|
java.lang.String |
getHeader(java.lang.String name)
Returns the value of the specified response header as a String.
|
java.lang.Object |
getInternalObject()
Returns the internal object of this WebResponse.
|
java.lang.Object |
getProperty(java.lang.String name)
Returns the value to which the specified "name" is mapped, or null if
this WebResponse contains no mapping for the "name".
|
int |
getStatus()
Gets the current status code of this response.
|
void |
send(byte[] bytes)
Writes b.length bytes of body from the specified byte array to the output
stream.
|
void |
setHeader(java.lang.String name,
java.lang.String value)
Sets a response header with the given name and value.
|
void |
setProperty(java.lang.String name,
java.lang.Object value)
Associates the specified value with the specified "name" in this
WebResponse.
|
void |
setStatus(int code)
Sets the status code for this response.
|
void setStatus(int code)
code - the status codeint getStatus()
void setHeader(java.lang.String name,
java.lang.String value)
name - the name of the headervalue - the header value If it contains octet string, it should be
encoded according to RFC 2047java.lang.String getHeader(java.lang.String name)
name - name a String specifying the header namevoid send(byte[] bytes) throws java.io.IOException
bytes - the datajava.io.IOException - if an I/O error occursboolean end()
void setProperty(java.lang.String name,
java.lang.Object value)
name - a "name" with which the specified value is to be associatedvalue - value to be associated with the specified "name"java.lang.Object getProperty(java.lang.String name)
name - the "name" whose associated value is to be returnedjava.lang.Object getInternalObject()