Enhydra 5.1 API

com.lutris.http.debug
Interface DebugRequest

All Known Implementing Classes:
RequestRecord, ServletHttpPresentationRequest

public interface DebugRequest

Object used to access HTTP request data for debugging purposes.

Since:
LBS1.7
Version:
$Revision: 1.1 $
Author:
Paul Morgan

Method Summary
 java.lang.String getAuthType()
          Returns the authentication scheme of the request, or null if none.
 int getContentLength()
          Returns the size of the request entity data, or -1 if not known.
 java.lang.String getContentType()
          Returns the Internet Media Type of the request entity data, or null if not known.
 javax.servlet.http.Cookie[] getCookies()
          Returns an array of cookies for this request, or a 0 length array if no cookies exist.
 java.lang.String getHeader(java.lang.String name)
          Returns the values of the specified header.
 java.util.Enumeration getHeaderNames()
          Returns the strings representing the header names for this request.
 java.lang.String getMethod()
          Returns the method with which the request was made.
 java.util.Enumeration getParameterNames()
          Returns the parameter names for this request as an array of strings, or a 0 length array if no parameters exist.
 java.lang.String[] getParameterValues(java.lang.String name)
          Returns the values of the specified query parameter for the request as an array of strings, or a 0 length array if the named parameter does not exist.
 java.lang.String getPathInfo()
          Returns optional extra path information following the presentation path, but immediately preceding the query string.
 java.lang.String getPathTranslated()
          Returns extra path information translated to a real path.
 java.lang.String getProtocol()
          Returns the protocol and version of the request as a string of the form <protocol>/<major version>.<minor version>.
 java.lang.String getQueryString()
          Returns the query string part of the presentation URI, or null if none.
 java.lang.String getRemoteAddr()
          Returns the IP address of the agent that sent the request.
 java.lang.String getRemoteHost()
          Returns the fully qualified host name of the agent that sent the request.
 java.lang.String getRemoteUser()
          Returns the name of the user making this request, or null if not known.
 java.lang.String getRequestURI()
          Returns the request URI.
 java.lang.String getScheme()
          Returns the scheme of the URL used in this request, for example "http", "https", or "ftp".
 java.lang.String getServerName()
          Returns the host name of the server that received the request.
 int getServerPort()
          Returns the port number on which this request was received.
 int getTotalBytes()
          Returns the number of bytes associated with the request.
 

Method Detail

getContentLength

public int getContentLength()
                     throws java.lang.Exception
Returns the size of the request entity data, or -1 if not known.

Throws:
java.lang.Exception - if an error occurs.

getContentType

public java.lang.String getContentType()
                                throws java.lang.Exception
Returns the Internet Media Type of the request entity data, or null if not known.

Throws:
java.lang.Exception - if an error occurs.

getProtocol

public java.lang.String getProtocol()
                             throws java.lang.Exception
Returns the protocol and version of the request as a string of the form <protocol>/<major version>.<minor version>.

Throws:
java.lang.Exception - if an error occurs.

getScheme

public java.lang.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.


getServerName

public java.lang.String getServerName()
Returns the host name of the server that received the request.


getServerPort

public int getServerPort()
Returns the port number on which this request was received.


getRemoteAddr

public java.lang.String getRemoteAddr()
                               throws java.lang.Exception
Returns the IP address of the agent that sent the request.

Throws:
java.lang.Exception - if an error occurs.

getRemoteHost

public java.lang.String getRemoteHost()
                               throws java.lang.Exception
Returns the fully qualified host name of the agent that sent the request.

Throws:
java.lang.Exception - if an error occurs.

getParameterValues

public java.lang.String[] getParameterValues(java.lang.String name)
                                      throws java.lang.Exception
Returns the values of the specified query parameter for the request as an array of strings, or a 0 length array if the named parameter does not exist.

Parameters:
name - the name of the parameter whose value is required.
Throws:
java.lang.Exception - if an error occurs.

getParameterNames

public java.util.Enumeration getParameterNames()
                                        throws java.lang.Exception
Returns the parameter names for this request as an array of strings, or a 0 length array if no parameters exist.

java.lang.Exception

getMethod

public java.lang.String getMethod()
                           throws java.lang.Exception
Returns the method with which the request was made. The returned value can be "GET", "HEAD", "POST", or an extension method.

Throws:
java.lang.Exception - if an error occurs.

getRequestURI

public java.lang.String getRequestURI()
                               throws java.lang.Exception
Returns the request URI.

Throws:
java.lang.Exception - if an error occurs.

getPathInfo

public java.lang.String getPathInfo()
                             throws java.lang.Exception
Returns optional extra path information following the presentation path, but immediately preceding the query string. Returns null if not specified. Same as the CGI variable PATH_INFO.

Throws:
java.lang.Exception - if an error occurs.

getPathTranslated

public java.lang.String getPathTranslated()
                                   throws java.lang.Exception
Returns extra path information translated to a real path. Returns null if no extra path information specified.

Throws:
java.lang.Exception - if an error occurs.

getQueryString

public java.lang.String getQueryString()
                                throws java.lang.Exception
Returns the query string part of the presentation URI, or null if none.

Throws:
java.lang.Exception - if an error occurs.

getRemoteUser

public java.lang.String getRemoteUser()
                               throws java.lang.Exception
Returns the name of the user making this request, or null if not known. The user name is set with HTTP authentication.

Throws:
java.lang.Exception - if an error occurs.

getAuthType

public java.lang.String getAuthType()
                             throws java.lang.Exception
Returns the authentication scheme of the request, or null if none.

Throws:
java.lang.Exception - if an error occurs.

getCookies

public javax.servlet.http.Cookie[] getCookies()
                                       throws java.lang.Exception
Returns an array of cookies for this request, or a 0 length array if no cookies exist.

Returns:
The array of cookies found in this request.
Throws:
java.lang.Exception - if an error occurs.

getHeader

public java.lang.String getHeader(java.lang.String name)
                           throws java.lang.Exception
Returns the values of the specified header. This should really return an array of strings, however Sun's servlet classes do not provide this functionality and thus implementing it would be mute.

Parameters:
name - the case-insensitive header field name
Throws:
java.lang.Exception - if an error occurs.

getHeaderNames

public java.util.Enumeration getHeaderNames()
                                     throws java.lang.Exception
Returns the strings representing the header names for this request. This does not have to return cookies. getCookies() can be used.

Throws:
java.lang.Exception - if an error occurs.

getTotalBytes

public int getTotalBytes()
Returns the number of bytes associated with the request.


Enhydra 5.1 API