public interface IResponse
Modifier and Type | Method and Description |
---|---|
void |
addCookie(javax.servlet.http.Cookie cookie)
Add a cookie to the response.
|
void |
addDateHeader(java.lang.String name,
long t)
Add a header as a long value
|
void |
addHeader(byte[] name,
byte[] value)
Add a header
|
void |
addHeader(java.lang.String name,
java.lang.String value)
Add a header
|
void |
addIntHeader(java.lang.String name,
int i)
Add a header as an int value
|
void |
clearHeaders()
Clears the headers datastructure
|
boolean |
containsHeader(byte[] name)
Returns true if the header with the supplied name is already present
|
boolean |
containsHeader(java.lang.String name)
Returns true is the header with the supplied name is already present
|
void |
flushBuffer() |
void |
flushBufferedContent()
Flushes the contents to wire
|
int |
getBufferSize() |
javax.servlet.http.Cookie[] |
getCookies()
Get all the cookies for the response
|
boolean |
getFlushMode()
Gets the flush mode.
|
java.lang.String |
getHeader(byte[] name)
Get a header
|
java.lang.String |
getHeader(java.lang.String name)
Get a header
|
java.util.Enumeration |
getHeaderNames()
Gets all the header names (keys)
|
java.util.Enumeration |
getHeaders(java.lang.String name)
Gets all the header values for a particular header name
|
java.util.Vector[] |
getHeaderTable()
Get the header table
|
javax.servlet.ServletOutputStream |
getOutputStream()
Get the OutputStream
|
IRequest |
getWCCRequest()
Get the webcontainer channel request object for this response
|
boolean |
isAllocateDirect()
Get whether to allocate direct or indirect byte buffers
|
boolean |
isCommitted()
Check if the response is committed yet
|
void |
prepareHeadersForWrite()
Prepare to write the headers
|
void |
releaseChannel() |
void |
removeCookie(java.lang.String cookieName) |
void |
removeHeader(byte[] name)
Removes the header with the given name
|
void |
removeHeader(java.lang.String name)
Removes the header with the given name
|
void |
resetBuffer() |
void |
setAllocateDirect(boolean allocateDirect)
Set whether to allocate direct or indirect byte buffers
|
void |
setBufferSize(int bufferSize) |
void |
setContentLanguage(byte[] value)
Set the content language for the response
|
void |
setContentLanguage(java.lang.String value)
Set the content language for the response
|
void |
setContentLength(int length)
Set the content length for the response
|
void |
setContentType(byte[] value)
Set the content type for the response
|
void |
setContentType(java.lang.String value)
Set the content type for the response
|
void |
setDateHeader(java.lang.String name,
long t)
Set date header as a long value
|
void |
setFlushMode(boolean flushToWire)
Sets the flush mode.
|
void |
setHeader(byte[] name,
byte[] bs) |
void |
setHeader(java.lang.String name,
java.lang.String s) |
void |
setIntHeader(java.lang.String name,
int i)
Set a header as an int
|
void |
setIsClosing(boolean isClosing) |
void |
setLastBuffer(boolean writeLastBuffer)
Set the last buffer mode
|
void |
setReason(byte[] reason)
Sets the reason in the response.
|
void |
setReason(java.lang.String reason)
Sets the reason in the response.
|
void |
setStatusCode(int code)
Sets the HTTP status code
|
void |
writeHeaders()
Write the headers
|
void setStatusCode(int code)
code
- the HTTP status codejavax.servlet.ServletOutputStream getOutputStream() throws java.io.IOException
java.io.IOException
boolean isCommitted()
void addHeader(java.lang.String name, java.lang.String value)
name
- the name of the headername
- the value of the headervoid addHeader(byte[] name, byte[] value)
name
- the name of the headervalue
- the value of the headervoid addDateHeader(java.lang.String name, long t)
name
- the header namet
- the header date valuevoid addIntHeader(java.lang.String name, int i)
name
- the header namei
- the header int valuevoid setDateHeader(java.lang.String name, long t)
name
- the header namet
- the header date valuevoid setIntHeader(java.lang.String name, int i)
name
- the header namei
- the header int valuejava.util.Enumeration getHeaderNames()
java.util.Enumeration getHeaders(java.lang.String name)
java.lang.String getHeader(java.lang.String name)
name
- the header namejava.util.Vector[] getHeaderTable()
java.lang.String getHeader(byte[] name)
name
- the header nameboolean containsHeader(java.lang.String name)
name
- the header nameboolean containsHeader(byte[] name)
name
- the header namevoid removeHeader(java.lang.String name)
name
- the header namevoid removeHeader(byte[] name)
name
- the header namevoid clearHeaders()
IRequest getWCCRequest()
void setFlushMode(boolean flushToWire)
flushToWire
- void setIsClosing(boolean isClosing)
boolean getFlushMode()
void flushBufferedContent()
void setReason(java.lang.String reason)
reason
- void setReason(byte[] reason)
reason
- void addCookie(javax.servlet.http.Cookie cookie)
cookie
- javax.servlet.http.Cookie[] getCookies()
void prepareHeadersForWrite()
void writeHeaders()
void setHeader(java.lang.String name, java.lang.String s)
name
- s
- void setHeader(byte[] name, byte[] bs)
name
- bs
- void setContentType(java.lang.String value)
value
- void setContentType(byte[] value)
value
- void setContentLanguage(java.lang.String value)
value
- void setContentLength(int length)
length
- void setContentLanguage(byte[] value)
value
- void setAllocateDirect(boolean allocateDirect)
allocateDirect
- boolean isAllocateDirect()
void setLastBuffer(boolean writeLastBuffer)
writeLastBuffer
- void releaseChannel()
void removeCookie(java.lang.String cookieName)
void resetBuffer()
int getBufferSize()
void setBufferSize(int bufferSize)
void flushBuffer() throws java.io.IOException
java.io.IOException