|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.abstracthorizon.danube.tapestry.DanubeResponse
public class DanubeResponse
WebResponse
interface implementation.
Field Summary | |
---|---|
protected HTTPConnection |
connection
Reference to connection |
protected boolean |
needReset
If true getPrintWriter(ContentType) will reset connection. |
Constructor Summary | |
---|---|
DanubeResponse(HTTPConnection connection)
Constructor |
Method Summary | |
---|---|
String |
encodeURL(String url)
Encodes url. |
String |
getNamespace()
Returns namespace |
OutputStream |
getOutputStream(ContentType contentType)
Returns output stream and sets content type |
PrintWriter |
getPrintWriter(ContentType contentType)
Returns print writer. |
void |
reset()
Resets connection. |
void |
sendError(int code,
String msg)
Sends error to the client |
void |
setContentLength(int len)
Sets content length. |
void |
setDateHeader(String name,
long date)
Sets date header |
void |
setHeader(String name,
String value)
Sets header |
void |
setIntHeader(String name,
int i)
Sets integer header |
void |
setStatus(int code)
Sets HTTP status |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected HTTPConnection connection
protected boolean needReset
getPrintWriter(ContentType)
will reset connection.
Constructor Detail |
---|
public DanubeResponse(HTTPConnection connection)
connection
- connectionMethod Detail |
---|
public OutputStream getOutputStream(ContentType contentType) throws IOException
getOutputStream
in interface WebResponse
contentType
-
IOException
public PrintWriter getPrintWriter(ContentType contentType) throws IOException
HTTPConnection.reset()
) if this method is called
second time.
getPrintWriter
in interface WebResponse
IOException
public String encodeURL(String url)
encodeURL
in interface WebResponse
url
- to be encoded
public void reset()
HTTPConnection.reset()
.
reset
in interface WebResponse
public void setContentLength(int len)
setContentLength
in interface WebResponse
len
- content lengthpublic String getNamespace()
getNamespace
in interface WebResponse
public void setDateHeader(String name, long date)
setDateHeader
in interface WebResponse
name
- header namedate
- datepublic void setHeader(String name, String value)
setHeader
in interface WebResponse
name
- header namevalue
- header valuepublic void setIntHeader(String name, int i)
setIntHeader
in interface WebResponse
name
- header namei
- integer valuepublic void setStatus(int code)
setStatus
in interface WebResponse
code
- status codepublic void sendError(int code, String msg) throws IOException
sendError
in interface WebResponse
code
- error codemsg
- error message
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |