|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.locomotive.loco.Response | +--org.locomotive.loco.servlet.LocoServletResponse
The response class for the servlet interface provides us all the methods required for both ServletResponses and HttpServletResponses. It uses the Response outputStream for its ServletOutputStream, and its own internal printwriter for the printWriter
Inner classes inherited from class org.locomotive.loco.Response |
Response.ResponseOutputStream |
Field Summary | |
protected java.io.PrintWriter |
resw
|
protected int |
status
|
protected boolean |
used_os
|
protected boolean |
used_writer
|
Fields inherited from class org.locomotive.loco.Response |
char_encoding,
content_type,
header_was_flushed,
os,
reply_type,
REPLY_TYPE_CGI,
REPLY_TYPE_ISAPI,
REPLY_TYPE_NSAPI,
request_id,
resos |
Fields inherited from interface javax.servlet.http.HttpServletResponse |
SC_ACCEPTED,
SC_BAD_GATEWAY,
SC_BAD_REQUEST,
SC_CONFLICT,
SC_CONTINUE,
SC_CREATED,
SC_FORBIDDEN,
SC_GATEWAY_TIMEOUT,
SC_GONE,
SC_HTTP_VERSION_NOT_SUPPORTED,
SC_INTERNAL_SERVER_ERROR,
SC_LENGTH_REQUIRED,
SC_METHOD_NOT_ALLOWED,
SC_MOVED_PERMANENTLY,
SC_MOVED_TEMPORARILY,
SC_MULTIPLE_CHOICES,
SC_NO_CONTENT,
SC_NON_AUTHORITATIVE_INFORMATION,
SC_NOT_ACCEPTABLE,
SC_NOT_FOUND,
SC_NOT_IMPLEMENTED,
SC_NOT_MODIFIED,
SC_OK,
SC_PARTIAL_CONTENT,
SC_PAYMENT_REQUIRED,
SC_PRECONDITION_FAILED,
SC_PROXY_AUTHENTICATION_REQUIRED,
SC_REQUEST_ENTITY_TOO_LARGE,
SC_REQUEST_TIMEOUT,
SC_REQUEST_URI_TOO_LONG,
SC_RESET_CONTENT,
SC_SEE_OTHER,
SC_SERVICE_UNAVAILABLE,
SC_SWITCHING_PROTOCOLS,
SC_UNAUTHORIZED,
SC_UNSUPPORTED_MEDIA_TYPE,
SC_USE_PROXY |
Constructor Summary | |
LocoServletResponse(java.io.OutputStream os,
int request_id,
int reply_type)
|
Method Summary | |
protected void |
addStatusToHeaders()
we don't currently have access to the status line via our tunnels, so we really can't do anything here... |
java.lang.String |
encodeRedirectUrl(java.lang.String url)
Deprecated. in favor of encodeRedirectURL |
java.lang.String |
encodeRedirectURL(java.lang.String url)
Encodes a url for use by the sendRedirect method. |
java.lang.String |
encodeUrl(java.lang.String url)
Deprecated. in favor of encodeURL |
java.lang.String |
encodeURL(java.lang.String url)
Encodes a url with any information necessary for session persistence. |
protected Response |
generateInclude()
Generates a crippled version of this response which will not allow headers to be set. |
javax.servlet.ServletOutputStream |
getOutputStream()
Retrieve our friendly ServletOutputStream. |
java.io.PrintWriter |
getWriter()
Retrieve the Response PrintWriter |
void |
sendError(int status_code)
Sends an error back to the requestor with the specified status code. |
void |
sendError(int status_code,
java.lang.String error_msg)
Sends an error back to the requestor with the specified status code and error message. |
void |
sendRedirect(java.lang.String location)
sends a redirect response to client. |
void |
setContentLength(int len)
Here for the servlet implementation- don't like this, though. |
void |
setDateHeader(java.lang.String name,
long date)
Sets a response header with the specified name and date. |
void |
setHeader(java.lang.String name,
java.lang.String value)
Sets a response header with the specified name and value. |
void |
setIntHeader(java.lang.String name,
int value)
Sets a response header with the specified name and integer value. |
void |
setStatus(int status_code)
Deprecated. no no apparent reason... |
void |
setStatus(int status_code,
java.lang.String message)
Deprecated. for no apparent reason |
void |
writeHeader(Log server_log)
makes sure the status makes it into the header |
Methods inherited from class org.locomotive.loco.Response |
addBytes,
addCookie,
addHTTPHeader,
addString,
clearBody,
clearHeaders,
containsHeader,
flush,
flush,
getCharacterEncoding,
getCurrentResponseLength,
getHeaderCount,
setAutoflush,
setContentType |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected boolean used_writer
protected boolean used_os
protected int status
protected java.io.PrintWriter resw
Constructor Detail |
public LocoServletResponse(java.io.OutputStream os, int request_id, int reply_type)
Method Detail |
public void setContentLength(int len)
public javax.servlet.ServletOutputStream getOutputStream() throws java.io.IOException
public java.io.PrintWriter getWriter() throws java.io.IOException
public java.lang.String encodeRedirectURL(java.lang.String url)
public java.lang.String encodeURL(java.lang.String url)
public void sendError(int status_code) throws java.io.IOException
javax.http.HttpServletResponse
public void sendError(int status_code, java.lang.String error_msg) throws java.io.IOException
javax.http.HttpServletResponse
public void sendRedirect(java.lang.String location) throws java.io.IOException
public void setDateHeader(java.lang.String name, long date)
Sun, 06 Nov 1994 08:49:37 GMT
public void setIntHeader(java.lang.String name, int value)
public void setHeader(java.lang.String name, java.lang.String value)
public java.lang.String encodeRedirectUrl(java.lang.String url)
public java.lang.String encodeUrl(java.lang.String url)
public void setStatus(int status_code)
public void setStatus(int status_code, java.lang.String message)
public void writeHeader(Log server_log) throws java.io.IOException
protected void addStatusToHeaders()
protected Response generateInclude() throws java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |