|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.connection.AbstractHttpRequest
com.caucho.server.connection.StubServletRequest
public class StubServletRequest
Used when there isn't any actual request object, e.g. for calling run-at servlets.
| Field Summary |
|---|
| Fields inherited from class com.caucho.server.connection.AbstractHttpRequest |
|---|
_calendar, _cb, _conn, _expect100Continue, _hasReadStream, _headerCodes, _hostHeader, _invocation, _rawRead, _readStream, _response, _server, _sessionGroup, _tcpConn, CONTEXT_PATH, ERROR_URI, EXCEPTION, EXCEPTION_TYPE, JSP_EXCEPTION, log, MESSAGE, PATH_INFO, QUERY_STRING, REQUEST_URI, SERVLET_NAME, SERVLET_PATH, SHUTDOWN, STATUS_CODE |
| Fields inherited from interface javax.servlet.http.HttpServletRequest |
|---|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
| Constructor Summary | |
|---|---|
StubServletRequest()
|
|
| Method Summary | |
|---|---|
java.lang.Object |
getAttribute(java.lang.String name)
Returns the value of the named request attribute. |
java.util.Enumeration<java.lang.String> |
getAttributeNames()
Returns an enumeration of the request attribute names. |
java.lang.String |
getAuthType()
Gets the authorization type |
java.lang.String |
getCharacterEncoding()
Returns the character encoding of a post. |
int |
getContentLength()
Returns the content length of a post. |
java.lang.String |
getContentType()
Returns the content-length of a post. |
java.lang.String |
getContextPath()
Returns the context part of the uri. |
long |
getDateHeader(java.lang.String header)
Returns a header interpreted as a date. |
java.lang.String |
getHeader(java.lang.String header)
Returns the named header. |
java.util.Enumeration<java.lang.String> |
getHeaderNames()
Enumerates the header keys |
java.util.Enumeration |
getHeaders(java.lang.String header)
Returns an enumeration of the headers for the named attribute. |
ServletInputStream |
getInputStream()
Returns a stream for reading POST data. |
int |
getIntHeader(java.lang.String header)
Returns the named header, converted to an integer. |
java.util.Locale |
getLocale()
Returns the request's preferred locale, based on the Accept-Language header. |
java.util.Enumeration<java.util.Locale> |
getLocales()
Returns an enumeration of all locales acceptable by the client. |
java.lang.String |
getMethod()
Returns the HTTP method, e.g. |
java.lang.String |
getParameter(java.lang.String name)
Returns the form primary value for the given name. |
java.util.Map<java.lang.String,java.lang.String[]> |
getParameterMap()
Returns a map of the form. |
java.util.Enumeration<java.lang.String> |
getParameterNames()
Returns an enumeration of the form names. |
java.lang.String[] |
getParameterValues(java.lang.String name)
Returns the form's values for the given name. |
java.lang.String |
getPathInfo()
Returns the portion of the uri after the servlet path for the original request. |
java.lang.String |
getPathTranslated()
Returns the real path of pathInfo. |
java.lang.String |
getProtocol()
Returns the prococol, e.g. |
java.lang.String |
getQueryString()
Returns the current page's query string. |
java.io.BufferedReader |
getReader()
Returns a Reader for the POST contents |
java.lang.String |
getRealPath(java.lang.String path)
Returns the path of the URI. |
java.lang.String |
getRemoteAddr()
Returns the IP address of the remote host, i.e. |
java.lang.String |
getRemoteHost()
Returns the DNS hostname of the remote host, i.e. |
int |
getRemotePort()
Returns the local port. |
java.lang.String |
getRemoteUser()
Gets the remote user from the authorization type |
RequestDispatcher |
getRequestDispatcher(java.lang.String uri)
Returns a request dispatcher relative to the current request. |
java.lang.String |
getRequestURI()
Returns the URI for the request |
java.lang.StringBuffer |
getRequestURL()
Returns the URL for the request |
java.lang.String |
getScheme()
Returns the request's scheme. |
java.lang.String |
getServerName()
Returns the local server name. |
int |
getServerPort()
Returns the server's port. |
java.lang.String |
getServletPath()
Returns the portion of the uri mapped to the servlet for the original request. |
byte[] |
getUriBuffer()
|
int |
getUriLength()
|
java.security.Principal |
getUserPrincipal()
Returns the Principal representing the logged in user. |
boolean |
initStream(ReadStream rawStream,
ReadStream realStream)
Initialize the read stream from the raw stream. |
boolean |
isSecure()
Returns true if the request is secure. |
boolean |
isUserInRole(java.lang.String str)
Returns true if the user represented by the current request plays the named role. |
void |
removeAttribute(java.lang.String name)
Removes the value of the named request attribute. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Sets the value of the named request attribute. |
void |
setCharacterEncoding(java.lang.String encoding)
Sets the character encoding of a post. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StubServletRequest()
| Method Detail |
|---|
public java.lang.Object getAttribute(java.lang.String name)
AbstractHttpRequest
getAttribute in interface ServletRequestgetAttribute in class AbstractHttpRequestname - the attribute name.
public java.util.Enumeration<java.lang.String> getAttributeNames()
AbstractHttpRequest
getAttributeNames in interface ServletRequestgetAttributeNames in class AbstractHttpRequest
public void setAttribute(java.lang.String name,
java.lang.Object value)
AbstractHttpRequest
setAttribute in interface ServletRequestsetAttribute in class AbstractHttpRequestname - the attribute name.value - the new attribute value.public void removeAttribute(java.lang.String name)
AbstractHttpRequest
removeAttribute in interface ServletRequestremoveAttribute in class AbstractHttpRequestname - the attribute name.
public boolean initStream(ReadStream rawStream,
ReadStream realStream)
AbstractHttpRequest
initStream in class AbstractHttpRequestpublic java.lang.String getCharacterEncoding()
AbstractHttpRequest
getCharacterEncoding in interface ServletRequestgetCharacterEncoding in class AbstractHttpRequestpublic void setCharacterEncoding(java.lang.String encoding)
AbstractHttpRequest
setCharacterEncoding in interface ServletRequestsetCharacterEncoding in class AbstractHttpRequestpublic int getContentLength()
AbstractHttpRequest
getContentLength in interface ServletRequestgetContentLength in class AbstractHttpRequestpublic java.lang.String getContentType()
AbstractHttpRequest
getContentType in interface ServletRequestgetContentType in class AbstractHttpRequestpublic ServletInputStream getInputStream()
AbstractHttpRequest
getInputStream in interface ServletRequestgetInputStream in class AbstractHttpRequestpublic java.lang.String getParameter(java.lang.String name)
AbstractHttpRequest
getParameter in interface ServletRequestgetParameter in class AbstractHttpRequestname - the form parameter to return
public java.util.Enumeration<java.lang.String> getParameterNames()
AbstractHttpRequest
getParameterNames in interface ServletRequestgetParameterNames in class AbstractHttpRequestpublic java.lang.String[] getParameterValues(java.lang.String name)
AbstractHttpRequest
getParameterValues in interface ServletRequestgetParameterValues in class AbstractHttpRequestname - key in the form
public java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
AbstractHttpRequest
getParameterMap in interface ServletRequestgetParameterMap in class AbstractHttpRequestpublic java.lang.String getProtocol()
ServletRequest
getProtocol in interface ServletRequestgetProtocol in class AbstractHttpRequestpublic java.io.BufferedReader getReader()
AbstractHttpRequest
getReader in interface ServletRequestgetReader in class AbstractHttpRequestpublic java.lang.String getRemoteAddr()
ServletRequest
getRemoteAddr in interface ServletRequestgetRemoteAddr in class AbstractHttpRequestpublic java.lang.String getRemoteHost()
ServletRequest
getRemoteHost in interface ServletRequestgetRemoteHost in class AbstractHttpRequestpublic int getRemotePort()
AbstractHttpRequest
getRemotePort in interface ServletRequestgetRemotePort in class AbstractHttpRequestpublic java.lang.String getScheme()
AbstractHttpRequest
getScheme in interface ServletRequestgetScheme in class AbstractHttpRequestpublic java.lang.String getServerName()
AbstractHttpRequest
getServerName in interface ServletRequestgetServerName in class AbstractHttpRequestpublic int getServerPort()
AbstractHttpRequest
getServerPort in interface ServletRequestgetServerPort in class AbstractHttpRequestpublic java.lang.String getRealPath(java.lang.String path)
ServletRequest
getRealPath in interface ServletRequestgetRealPath in class AbstractHttpRequestpublic java.util.Locale getLocale()
ServletRequest
getLocale in interface ServletRequestgetLocale in class AbstractHttpRequestpublic java.util.Enumeration<java.util.Locale> getLocales()
ServletRequest
getLocales in interface ServletRequestgetLocales in class AbstractHttpRequestpublic boolean isSecure()
AbstractHttpRequest
isSecure in interface ServletRequestisSecure in class AbstractHttpRequestpublic RequestDispatcher getRequestDispatcher(java.lang.String uri)
AbstractHttpRequest
getRequestDispatcher in interface ServletRequestgetRequestDispatcher in class AbstractHttpRequesturi - the relative uri to the new servlet.
public java.lang.String getMethod()
HttpServletRequestREQUEST_METHOD
getMethod in interface HttpServletRequestgetMethod in class AbstractHttpRequestpublic java.lang.String getServletPath()
AbstractHttpRequest
getServletPath in interface HttpServletRequestgetServletPath in class AbstractHttpRequestpublic java.lang.String getContextPath()
AbstractHttpRequest
getContextPath in interface HttpServletRequestgetContextPath in class AbstractHttpRequestpublic java.lang.String getPathInfo()
AbstractHttpRequest
getPathInfo in interface HttpServletRequestgetPathInfo in class AbstractHttpRequestpublic java.lang.String getPathTranslated()
AbstractHttpRequest
getPathTranslated in interface HttpServletRequestgetPathTranslated in class AbstractHttpRequestpublic java.lang.String getRequestURI()
AbstractHttpRequest
getRequestURI in interface HttpServletRequestgetRequestURI in class AbstractHttpRequestpublic java.lang.StringBuffer getRequestURL()
AbstractHttpRequest
getRequestURL in interface HttpServletRequestgetRequestURL in class AbstractHttpRequestpublic int getUriLength()
getUriLength in class AbstractHttpRequestpublic byte[] getUriBuffer()
getUriBuffer in class AbstractHttpRequestpublic java.lang.String getQueryString()
AbstractHttpRequest
getQueryString in interface HttpServletRequestgetQueryString in class AbstractHttpRequestpublic java.lang.String getHeader(java.lang.String header)
AbstractHttpRequest
getHeader in interface HttpServletRequestgetHeader in class AbstractHttpRequestheader - the header key
public int getIntHeader(java.lang.String header)
AbstractHttpRequest
getIntHeader in interface HttpServletRequestgetIntHeader in class AbstractHttpRequestheader - the header key.
public long getDateHeader(java.lang.String header)
AbstractHttpRequest
getDateHeader in interface HttpServletRequestgetDateHeader in class AbstractHttpRequestheader - the header key.
public java.util.Enumeration getHeaders(java.lang.String header)
AbstractHttpRequest
getHeaders in interface HttpServletRequestgetHeaders in class AbstractHttpRequestheader - the header name
public java.util.Enumeration<java.lang.String> getHeaderNames()
AbstractHttpRequest
getHeaderNames in interface HttpServletRequestgetHeaderNames in class AbstractHttpRequestpublic java.lang.String getAuthType()
AbstractHttpRequest
getAuthType in interface HttpServletRequestgetAuthType in class AbstractHttpRequestpublic java.lang.String getRemoteUser()
AbstractHttpRequest
getRemoteUser in interface HttpServletRequestgetRemoteUser in class AbstractHttpRequestpublic java.security.Principal getUserPrincipal()
AbstractHttpRequest
getUserPrincipal in interface SecurityContextProvidergetUserPrincipal in interface HttpServletRequestgetUserPrincipal in class AbstractHttpRequestpublic boolean isUserInRole(java.lang.String str)
AbstractHttpRequest
isUserInRole in interface SecurityContextProviderisUserInRole in interface HttpServletRequestisUserInRole in class AbstractHttpRequeststr - the named role to test.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||