    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

##

httpSession
is
reader
requestedSessionID
response
sessionContext
STATE_PARAMETERS

##

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

##

STATE_PARAMETERS

     public static final String STATE_PARAMETERS

response

     protected JigsawHttpServletResponse response

httpSession

     protected JigsawHttpSession httpSession

sessionContext

     protected JigsawHttpSessionContext sessionContext

requestedSessionID

     protected String requestedSessionID

is

     protected ServletInputStream is

reader

     protected BufferedReader reader

##

getURLParameter

     protected String getURLParameter(String name)

getCharacterEncoding

     public String getCharacterEncoding()

  Return the Charset parameter of content type

  Returns:
    A String instance

getContentLength

     public int getContentLength()

  ServletRequest implementation - Get the length of request data.

  Returns:
    An int, or -1.

getContentType

     public String getContentType()

  ServletRequest implementation - Get the type of the request's body.

  Returns:
    A String encoded mime type, or null.

getProtocol

     public String getProtocol()

  ServletRequest implementation - Get the protocol of that request.

  Returns:
    A String encoded version of the protocol.

getServerName

     public String getServerName()

  ServletRequest implementation - Get the name of queried server.

  Returns:
    Name of server, as a String.

getServerPort

     public int getServerPort()

  ServletRequest implementation - Get the port of queried server.

  Returns:
    A port number (int).

getRemoteAddr

     public String getRemoteAddr()

  ServletRequest implementation - Get the IP address of requests's sender.

  Returns:
    Numeric IP address, as a String.

getRemoteHost

     public String getRemoteHost()

  ServletRequest implementation - FQDN of request's sender.

  Returns:
    Name of client's machine (FQDN).

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.

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

getJigsawInputStream

     protected ServletInputStream getJigsawInputStream() throws IOException

  Throws: IOException
    if an IO error occurs

getParameter

     public String getParameter(String name)

  ServletRequest implementation - Get a parameter value.

  Returns:
    The String encoded value for the parameter.

getParameterValues

     public String[] getParameterValues(String parameter)

  ServletRequest implementation - Get the parameters value.

  Returns:
    The String array encoded value for the parameter.

getParameterNames

     public Enumeration getParameterNames()

  ServletRequest implementation - List available parameters.

  Returns:
    An enumeration of parameter names.

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.

getMethod

     public String getMethod()

  HttpServletRequest implementation - Get the request's method.

  Returns:
    A String instance.

getPathInfo

     public String getPathInfo()

  HttpServletRequest implementation - Get the request's path info.

  Returns:
    A String instance or null.

getPathTranslated

     public String getPathTranslated()

  HttpServletRequest implementation - Get the request's path translated.

  Returns:
    A String instance or null.

getQueryString

     public String getQueryString()

  HttpServletRequest implementation - Get the request's query string.

  Returns:
    A String instance or null.

getRemoteUser

     public String getRemoteUser()

  HttpServletRequest implementation - Get the request's user (if any).

  Returns:
    A String instance or null.

getAuthType

     public String getAuthType()

  HttpServletRequest implementation - Get the request's auth method.

  Returns:
    A String instance or null.

getHeader

     public String getHeader(String name)

  HttpServletRequest implementation - Get a request header as a String.

  Returns:
    A String instance or null.

getIntHeader

     public int getIntHeader(String name)

  HttpServletRequest implementation - Get a request header as an int.

  Returns:
    An int, or -1.

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.

getHeaderNames

     public Enumeration getHeaderNames()

  HttpServletRequest implementation - Get a all header names.

  Returns:
    An enumeration.

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.

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.

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.

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.

convertCookie

     protected Cookie convertCookie(HttpCookie httpCookie)

getRequestedSessionIdFromCookie

     protected String getRequestedSessionIdFromCookie()

getRequestedSessionIdFromURL

     protected String getRequestedSessionIdFromURL()

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.

getSessionContext

     protected synchronized JigsawHttpSessionContext getSessionContext()

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.

getCookieName

     protected String getCookieName()

createCookie

     protected Cookie createCookie()

getSession

     protected HttpSession getSession(String sessionId)

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.

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

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

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