All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.w3c.jigsaw.servlet.JigsawHttpServletRequest

java.lang.Object
   |
   +----org.w3c.jigsaw.servlet.JigsawHttpServletRequest

public class JigsawHttpServletRequest
extends Object
implements HttpServletRequest

Variable Index

 o httpSession
 o is
 o reader
 o requestedSessionID
 o response
 o sessionContext
 o STATE_PARAMETERS

Method Index

 o convertCookie(HttpCookie)
 o createCookie()
 o getAttribute(String)
ServletRequest implementation - Get an attribute of the request.
 o getAuthType()
HttpServletRequest implementation - Get the request's auth method.
 o getCharacterEncoding()
Return the Charset parameter of content type
 o getContentLength()
ServletRequest implementation - Get the length of request data.
 o getContentType()
ServletRequest implementation - Get the type of the request's body.
 o getCookieName()
 o getCookies()
Gets the array of cookies found in this request.
 o getDateHeader(String)
HttpServletRequest implementation - Get a request header as an date.
 o getHeader(String)
HttpServletRequest implementation - Get a request header as a String.
 o getHeaderNames()
HttpServletRequest implementation - Get a all header names.
 o getInputStream()
Returns an input stream for reading binary data in the request body.
 o getIntHeader(String)
HttpServletRequest implementation - Get a request header as an int.
 o getJigsawInputStream()
 o getMethod()
HttpServletRequest implementation - Get the request's method.
 o getParameter(String)
ServletRequest implementation - Get a parameter value.
 o getParameterNames()
ServletRequest implementation - List available parameters.
 o getParameterValues(String)
ServletRequest implementation - Get the parameters value.
 o getPathInfo()
HttpServletRequest implementation - Get the request's path info.
 o getPathTranslated()
HttpServletRequest implementation - Get the request's path translated.
 o getProtocol()
ServletRequest implementation - Get the protocol of that request.
 o getQueryString()
HttpServletRequest implementation - Get the request's query string.
 o getReader()
Returns a buffered reader for reading text in the request body.
 o getRealPath(String)
ServletRequest implementation - Get real path.
 o getRemoteAddr()
ServletRequest implementation - Get the IP address of requests's sender.
 o getRemoteHost()
ServletRequest implementation - FQDN of request's sender.
 o getRemoteUser()
HttpServletRequest implementation - Get the request's user (if any).
 o getRequestedSessionId()
Gets the session id specified with this request.
 o getRequestedSessionIdFromCookie()
 o getRequestedSessionIdFromURL()
 o getRequestURI()
Gets, from the first line of the HTTP request, the part of this request's URI that is to the left of any query string.
 o getScheme()
 o getServerName()
ServletRequest implementation - Get the name of queried server.
 o getServerPort()
ServletRequest implementation - Get the port of queried server.
 o getServletPath()
Gets the part of this request's URI that refers to the servlet being invoked.
 o getSession(boolean)
Gets the current valid session associated with this request, if create is false or, if necessary, creates a new session for the request, if create is true.
 o getSession(String)
 o getSessionContext()
 o getURLParameter(String)
 o isRequestedSessionIdFromCookie()
Checks whether the session id specified by this request came in as a cookie.
 o isRequestedSessionIdFromUrl()
Checks whether the session id specified by this request came in as part of the URL.
 o isRequestedSessionIdValid()
Checks whether this request is associated with a session that is valid in the current session context.

Variables

 o STATE_PARAMETERS
 public static final String STATE_PARAMETERS
 o response
 protected JigsawHttpServletResponse response
 o httpSession
 protected JigsawHttpSession httpSession
 o sessionContext
 protected JigsawHttpSessionContext sessionContext
 o requestedSessionID
 protected String requestedSessionID
 o is
 protected ServletInputStream is
 o reader
 protected BufferedReader reader

Methods

 o getURLParameter
 protected String getURLParameter(String name)
 o getCharacterEncoding
 public String getCharacterEncoding()
Return the Charset parameter of content type

Returns:
A String instance
 o getContentLength
 public int getContentLength()
ServletRequest implementation - Get the length of request data.

Returns:
An int, or -1.
 o getContentType
 public String getContentType()
ServletRequest implementation - Get the type of the request's body.

Returns:
A String encoded mime type, or null.
 o getProtocol
 public String getProtocol()
ServletRequest implementation - Get the protocol of that request.

Returns:
A String encoded version of the protocol.
 o getServerName
 public String getServerName()
ServletRequest implementation - Get the name of queried server.

Returns:
Name of server, as a String.
 o getServerPort
 public int getServerPort()
ServletRequest implementation - Get the port of queried server.

Returns:
A port number (int).
 o getRemoteAddr
 public String getRemoteAddr()
ServletRequest implementation - Get the IP address of requests's sender.

Returns:
Numeric IP address, as a String.
 o getRemoteHost
 public String getRemoteHost()
ServletRequest implementation - FQDN of request's sender.

Returns:
Name of client's machine (FQDN).
 o getRealPath
 public String getRealPath(String name)
ServletRequest implementation - Get real path. Jigsaw realy has no notion of translation stricto sensu (it has much better in fact ;-). This is a pain here.

Returns:
Always null.
 o getInputStream
 public ServletInputStream getInputStream() throws IOException
Returns an input stream for reading binary data in the request body.

Throws: IllegalStateException
if getReader has been called on this same request.
Throws: IOException
on other I/O related errors.
See Also:
getReader
 o getJigsawInputStream
 protected ServletInputStream getJigsawInputStream() throws IOException
Throws: IOException
if an IO error occurs
 o getParameter
 public String getParameter(String name)
ServletRequest implementation - Get a parameter value.

Returns:
The String encoded value for the parameter.
 o getParameterValues
 public String[] getParameterValues(String parameter)
ServletRequest implementation - Get the parameters value.

Returns:
The String array encoded value for the parameter.
 o getParameterNames
 public Enumeration getParameterNames()
ServletRequest implementation - List available parameters.

Returns:
An enumeration of parameter names.
 o getAttribute
 public Object getAttribute(String name)
ServletRequest implementation - Get an attribute of the request. This closely match Jigsaw's notion of request state.

Parameters:
name - The name of the attribute.
Returns:
An object that gives the value of the attribute.
 o getMethod
 public String getMethod()
HttpServletRequest implementation - Get the request's method.

Returns:
A String instance.
 o getPathInfo
 public String getPathInfo()
HttpServletRequest implementation - Get the request's path info.

Returns:
A String instance or null.
 o getPathTranslated
 public String getPathTranslated()
HttpServletRequest implementation - Get the request's path translated.

Returns:
A String instance or null.
 o getQueryString
 public String getQueryString()
HttpServletRequest implementation - Get the request's query string.

Returns:
A String instance or null.
 o getRemoteUser
 public String getRemoteUser()
HttpServletRequest implementation - Get the request's user (if any).

Returns:
A String instance or null.
 o getAuthType
 public String getAuthType()
HttpServletRequest implementation - Get the request's auth method.

Returns:
A String instance or null.
 o getHeader
 public String getHeader(String name)
HttpServletRequest implementation - Get a request header as a String.

Returns:
A String instance or null.
 o getIntHeader
 public int getIntHeader(String name)
HttpServletRequest implementation - Get a request header as an int.

Returns:
An int, or -1.
 o getDateHeader
 public long getDateHeader(String name)
HttpServletRequest implementation - Get a request header as an date.

Returns:
An long (as a number of milliseconds), or -1.
 o getHeaderNames
 public Enumeration getHeaderNames()
HttpServletRequest implementation - Get a all header names.

Returns:
An enumeration.
 o getRequestURI
 public String getRequestURI()
Gets, from the first line of the HTTP request, the part of this request's URI that is to the left of any query string.

 o getServletPath
 public String getServletPath()
Gets the part of this request's URI that refers to the servlet being invoked. Analogous to the CGI variable SCRIPT_NAME.

 o getScheme
 public String getScheme()
Returns:
the scheme of the URL used in this request, for example "http", "https", or "ftp". Different schemes have different rules for constructing URLs, as noted in RFC 1738. The URL used to create a request may be reconstructed using this scheme, the server name and port, and additional information such as URIs.
 o getCookies
 public Cookie[] getCookies()
Gets the array of cookies found in this request.

Returns:
the array of cookies found in this request or null if there is no cookie.
 o convertCookie
 protected Cookie convertCookie(HttpCookie httpCookie)
 o getRequestedSessionIdFromCookie
 protected String getRequestedSessionIdFromCookie()
 o getRequestedSessionIdFromURL
 protected String getRequestedSessionIdFromURL()
 o getRequestedSessionId
 public String getRequestedSessionId()
Gets the session id specified with this request. This may differ from the actual session id. For example, if the request specified an id for an invalid session, then this will get a new session with a new id.

Returns:
the session id specified by this request, or null if the request did not specify a session id.
 o getSessionContext
 protected synchronized JigsawHttpSessionContext getSessionContext()
 o getSession
 public HttpSession getSession(boolean create)
Gets the current valid session associated with this request, if create is false or, if necessary, creates a new session for the request, if create is true.

Returns:
the session associated with this request or null if create was false and no valid session is associated with this request.
 o getCookieName
 protected String getCookieName()
 o createCookie
 protected Cookie createCookie()
 o getSession
 protected HttpSession getSession(String sessionId)
 o isRequestedSessionIdValid
 public boolean isRequestedSessionIdValid()
Checks whether this request is associated with a session that is valid in the current session context. If it is not valid, the requested session will never be returned from the getSession method.

Returns:
true if this request is assocated with a session that is valid in the current session context.
 o isRequestedSessionIdFromCookie
 public boolean isRequestedSessionIdFromCookie()
Checks whether the session id specified by this request came in as a cookie. (The requested session may not be one returned by the getSession method.)

Returns:
true if the session id specified by this request came in as a cookie; false otherwise
 o isRequestedSessionIdFromUrl
 public boolean isRequestedSessionIdFromUrl()
Checks whether the session id specified by this request came in as part of the URL. (The requested session may not be the one returned by the getSession method.)

Returns:
true if the session id specified by the request for this session came in as part of the URL; false otherwise
 o getReader
 public BufferedReader getReader() throws IOException
Returns a buffered reader for reading text in the request body. This translates character set encodings as appropriate.

Throws: UnsupportedEncodingException
if the character set encoding is unsupported, so the text can't be correctly decoded.
Throws: IllegalStateException
if getInputStream has been called on this same request.
Throws: IOException
on other I/O related errors.
See Also:
getInputStream

All Packages  Class Hierarchy  This Package  Previous  Next  Index