|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
javax.servlet.ServletResponseWrapper
javax.servlet.http.HttpServletResponseWrapper
org.apache.beehive.netui.pageflow.scoping.internal.ScopedResponseImpl
public class ScopedResponseImpl
A wrapper around HttpServletResponse, associated with a given scope-key. Delegates to the wrapped response object for some functionality, but prevents output or error codes or forwards from actually happening.
Field Summary |
---|
Fields inherited from interface javax.servlet.http.HttpServletResponse |
---|
SC_ACCEPTED, SC_BAD_GATEWAY, SC_BAD_REQUEST, SC_CONFLICT, SC_CONTINUE, SC_CREATED, SC_EXPECTATION_FAILED, SC_FORBIDDEN, SC_FOUND, 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_REQUESTED_RANGE_NOT_SATISFIABLE, SC_RESET_CONTENT, SC_SEE_OTHER, SC_SERVICE_UNAVAILABLE, SC_SWITCHING_PROTOCOLS, SC_TEMPORARY_REDIRECT, SC_UNAUTHORIZED, SC_UNSUPPORTED_MEDIA_TYPE, SC_USE_PROXY |
Constructor Summary | |
---|---|
ScopedResponseImpl(javax.servlet.http.HttpServletResponse servletResponse) |
Method Summary | |
---|---|
void |
addCookie(javax.servlet.http.Cookie cookie) Add a cookie to the response. |
void |
addDateHeader(String name, long date) Adds a response header with the given name and date-value. |
void |
addHeader(String name, String value) Adds a response header with the given name and value. |
void |
addIntHeader(String name, int value) Adds a response header with the given name and integer value. |
protected void |
addObjectHeader(String name, Object val) |
void |
applyRedirect() Actually send the redirect that was suggested by sendRedirect(java.lang.String) . |
boolean |
containsHeader(String name) Returns true if this response containes the given header. |
boolean |
didRedirect() Tell whether a browser redirect was sent. |
javax.servlet.http.Cookie |
getCookie(String cookieName) Gets a cookie that was added to the response. |
javax.servlet.http.Cookie[] |
getCookies() Gets all Cookies that were added to the response. |
Object |
getFirstHeader(String name) Gets the first header with the given name. |
Map |
getHeaders() Gets all headers. |
List |
getHeaders(String name) Gets all headers with the given name. |
javax.servlet.http.HttpServletResponse |
getOuterResponse() |
String |
getRedirectURI() Get the redirect URI. |
int |
getStatusCode() Get the status code on the response. |
String |
getStatusMessage() Get the status message on the response. |
boolean |
isError() Tell whether the response is in error. |
void |
reset() |
void |
resetBuffer() |
void |
sendError(int i) |
void |
sendError(int i, String s) |
void |
sendRedirect(String redirectURI) |
void |
setBufferSize(int i) |
void |
setContentLength(int i) |
void |
setContentType(String s) |
void |
setDateHeader(String name, long date) Sets a response header with the given name and date-value. |
void |
setHeader(String name, String value) Sets a response header with the given name and value. |
void |
setIntHeader(String name, int value) Sets a response header with the given name and integer value. |
protected void |
setObjectHeader(String name, Object val) |
void |
setStatus(int i) |
void |
setStatus(int i, String s) |
Methods inherited from class javax.servlet.http.HttpServletResponseWrapper |
---|
encodeRedirectUrl, encodeRedirectURL, encodeUrl, encodeURL |
Methods inherited from class javax.servlet.ServletResponseWrapper |
---|
flushBuffer, getBufferSize, getCharacterEncoding, getContentType, getLocale, getOutputStream, getResponse, getWriter, isCommitted, setCharacterEncoding, setLocale, setResponse |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.http.HttpServletResponse |
---|
encodeRedirectUrl, encodeRedirectURL, encodeUrl, encodeURL |
Methods inherited from interface javax.servlet.ServletResponse |
---|
flushBuffer, getBufferSize, getCharacterEncoding, getContentType, getLocale, getOutputStream, getWriter, isCommitted, setCharacterEncoding, setLocale |
Constructor Detail |
---|
public ScopedResponseImpl(javax.servlet.http.HttpServletResponse servletResponse)
Method Detail |
---|
public void sendError(int i, String s) throws IOException
sendError
in interface javax.servlet.http.HttpServletResponse
sendError
in class javax.servlet.http.HttpServletResponseWrapper
IOException
public void sendError(int i) throws IOException
sendError
in interface javax.servlet.http.HttpServletResponse
sendError
in class javax.servlet.http.HttpServletResponseWrapper
IOException
public void setStatus(int i)
setStatus
in interface javax.servlet.http.HttpServletResponse
setStatus
in class javax.servlet.http.HttpServletResponseWrapper
public void setStatus(int i, String s)
setStatus
in interface javax.servlet.http.HttpServletResponse
setStatus
in class javax.servlet.http.HttpServletResponseWrapper
public void setContentLength(int i)
setContentLength
in interface javax.servlet.ServletResponse
setContentLength
in class javax.servlet.ServletResponseWrapper
public void setContentType(String s)
setContentType
in interface javax.servlet.ServletResponse
setContentType
in class javax.servlet.ServletResponseWrapper
public void setBufferSize(int i)
setBufferSize
in interface javax.servlet.ServletResponse
setBufferSize
in class javax.servlet.ServletResponseWrapper
public void resetBuffer()
resetBuffer
in interface javax.servlet.ServletResponse
resetBuffer
in class javax.servlet.ServletResponseWrapper
public void reset()
reset
in interface javax.servlet.ServletResponse
reset
in class javax.servlet.ServletResponseWrapper
public void addCookie(javax.servlet.http.Cookie cookie)
addCookie
in interface javax.servlet.http.HttpServletResponse
addCookie
in class javax.servlet.http.HttpServletResponseWrapper
public javax.servlet.http.Cookie getCookie(String cookieName)
getCookie
in interface ScopedResponse
public javax.servlet.http.Cookie[] getCookies()
getCookies
in interface ScopedResponse
public boolean containsHeader(String name)
true
if this response containes the given header.containsHeader
in interface javax.servlet.http.HttpServletResponse
containsHeader
in class javax.servlet.http.HttpServletResponseWrapper
public void setDateHeader(String name, long date)
setDateHeader
in interface javax.servlet.http.HttpServletResponse
setDateHeader
in class javax.servlet.http.HttpServletResponseWrapper
public void addDateHeader(String name, long date)
addDateHeader
in interface javax.servlet.http.HttpServletResponse
addDateHeader
in class javax.servlet.http.HttpServletResponseWrapper
public void setHeader(String name, String value)
setHeader
in interface javax.servlet.http.HttpServletResponse
setHeader
in class javax.servlet.http.HttpServletResponseWrapper
public void addHeader(String name, String value)
addHeader
in interface javax.servlet.http.HttpServletResponse
addHeader
in class javax.servlet.http.HttpServletResponseWrapper
public void setIntHeader(String name, int value)
setIntHeader
in interface javax.servlet.http.HttpServletResponse
setIntHeader
in class javax.servlet.http.HttpServletResponseWrapper
public void addIntHeader(String name, int value)
addIntHeader
in interface javax.servlet.http.HttpServletResponse
addIntHeader
in class javax.servlet.http.HttpServletResponseWrapper
public Map getHeaders()
getHeaders
in interface ScopedResponse
public List getHeaders(String name)
getHeaders
in interface ScopedResponse
null
if none are found.public Object getFirstHeader(String name)
getFirstHeader
in interface ScopedResponse
null
if none is found.protected void addObjectHeader(String name, Object val)
protected void setObjectHeader(String name, Object val)
public javax.servlet.http.HttpServletResponse getOuterResponse()
getOuterResponse
in interface ScopedResponse
public boolean isError()
ScopedResponse
isError
in interface ScopedResponse
true
if HttpServletResponse.sendError(int,String)
or HttpServletResponse.sendError(int)
was called.public int getStatusCode()
ScopedResponse
getStatusCode
in interface ScopedResponse
HttpServletResponse.setStatus(int)
, HttpServletResponse.sendError(int,String)
, or HttpServletResponse.sendError(int)
; -1 if no status was set explicitly.public String getStatusMessage()
ScopedResponse
getStatusMessage
in interface ScopedResponse
HttpServletResponse.sendError(int,String)
, or null
if none was set.public void sendRedirect(String redirectURI) throws IOException
sendRedirect
in interface javax.servlet.http.HttpServletResponse
sendRedirect
in class javax.servlet.http.HttpServletResponseWrapper
IOException
public void applyRedirect() throws IOException
sendRedirect(java.lang.String)
.applyRedirect
in interface ScopedResponse
IllegalStateException
- if sendRedirect(java.lang.String)
was not called.IOException
- if HttpServletResponse.sendRedirect(java.lang.String)
causes an IOException.public boolean didRedirect()
ScopedResponse
didRedirect
in interface ScopedResponse
true
if HttpServletResponse.sendRedirect(java.lang.String)
was called.public String getRedirectURI()
ScopedResponse
getRedirectURI
in interface ScopedResponse
HttpServletResponse.sendRedirect(java.lang.String)
, or null
if there was no redirect.
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2010, Oracle. All rights reserved.