|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.oio.bugkilla.protocol.HttpRequest
Represent one HttpRequest-Object
TestStep
,
Serialized FormConstructor Summary | |
HttpRequest()
Construct a new HttpRequest |
|
HttpRequest(java.lang.String name)
Construct a new HttpRequest with a specified name |
Method Summary | |
java.lang.Object |
getAttribute(java.lang.String name)
Returns the value of the named attribute as an Object, or null if no attribute of the given name exists. |
java.util.Enumeration |
getAttributeNames()
Returns an Enumeration containing the names of the attributes available to this request. |
java.util.Hashtable |
getAttributes()
Returns the attributes of this request as Hashtable |
java.lang.String |
getAuthType()
Returns the name of the authentication scheme used to protect the servlet. |
java.lang.String |
getContentType()
Returns the MIME type of the body of the request, or null if the type is not known. |
java.lang.String |
getContextPath()
Returns the portion of the request URI that indicates the context of the request. |
Cookie |
getCookie(java.lang.String name)
Returns a Cookie-object specified by its name |
java.util.Hashtable |
getCookies()
Returns a Hashtable containing all of the Cookie objects the client sent with this request. |
java.lang.String |
getMethod()
Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT. |
java.lang.String |
getName()
Returns the Identificationname of the HttpRequest |
java.lang.Object |
getParameter(java.lang.String name)
Returns the value of a request parameter as a Object (String or String[]), or null if the parameter does not exist. |
java.util.Enumeration |
getParameterNames()
Returns an Enumeration of String objects containing the names of the parameters contained in this request. |
java.util.Hashtable |
getParameters()
Returns the parameters of this request as Hashtable |
java.lang.String |
getPathInfo()
Returns any extra path information associated with the URL the client sent when it made this request. |
java.lang.String |
getProtocol()
Returns the name and version of the protocol the request uses in the form protocol/majorVersion.minorVersion, for example, HTTP/1.1. |
java.lang.String |
getQueryString()
Returns the query string that is contained in the request URL after the path. |
java.lang.String |
getRemoteAddr()
Returns the Internet Protocol (IP) address of the client that sent the request. |
java.lang.String |
getRemoteHost()
Returns the fully qualified name of the client that sent the request. |
java.lang.String |
getRemoteUser()
Returns the login of the user making this request, if the user has been authenticated, or null if the user has not been authenticated. |
java.lang.String |
getRequestedSessionId()
Returns the session ID specified by the client. |
java.lang.String |
getRequestURI()
Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request. |
java.lang.String |
getRequestURL()
The returned URL contains a protocol, server name, port number, and server path, but it does not include query string parameters. |
java.lang.String |
getScheme()
Returns the name of the scheme used to make 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. |
java.lang.String |
getServletPath()
Returns the part of this request's URL that calls the servlet. |
HttpSession |
getSession()
Returns the session associated with this request |
boolean |
isSecure()
Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS. |
void |
setAttribute(java.lang.String name,
java.lang.Object obj)
Sets an attribute of this request. |
void |
setAttributes(java.util.Hashtable attributes)
Sets the attributes of this request as Hashtable . |
void |
setAuthType(java.lang.String authType)
Sets the name of the authentication scheme used to protect the servlet. |
void |
setContentType(java.lang.String contentType)
Sets the MIME type of the body of the request, or null if the type is not known. |
void |
setContextPath(java.lang.String contextPath)
Sets the portion of the request URI that indicates the context of the request. |
void |
setCookie(java.lang.String name,
Cookie cookie)
Adds a Cookie (identifier of the Cookie ant the Cookie) at the Hashtable |
void |
setCookies(java.util.Hashtable cookies)
Sets a Hashtable containing all of the Cookie objects the client sent with this request. |
void |
setMethod(java.lang.String method)
Sets the name of the HTTP method with which this request was made, for example, GET, POST, or PUT. |
void |
setName(java.lang.String name)
Sets the Identificationname of the HttpRequest |
void |
setParameter(java.lang.String name,
java.lang.Object obj)
Also obj can be a String[] containing more than 1 value for the parameter |
void |
setParameters(java.util.Hashtable parameters)
Sets the parameters of this request as Hashtable . |
void |
setPathInfo(java.lang.String pathInfo)
Sets any extra path information associated with the URL the client sent when it made this request. |
void |
setProtocol(java.lang.String protocol)
Sets the name and version of the protocol the request uses in the form protocol/majorVersion.minorVersion, for example, HTTP/1.1. |
void |
setQueryString(java.lang.String queryString)
Sets the query string that is contained in the request URL after the path. |
void |
setRemoteAddr(java.lang.String remoteAddr)
Sets the Internet Protocol (IP) address of the client that sent the request. |
void |
setRemoteHost(java.lang.String remoteHost)
Sets the fully qualified name of the client that sent the request. |
void |
setRemoteUser(java.lang.String remoteUser)
Sets the login of the user making this request, if the user has been authenticated, or null if the user has not been authenticated. |
void |
setRequestedSessionId(java.lang.String requestedSessionId)
Sets the session ID specified by the client. |
void |
setRequestURI(java.lang.String requestURI)
Sets the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request. |
void |
setRequestURL(java.lang.String requestURL)
Sets the URL contains a protocol, server name, port number, and server path, but it does not include query string parameters. |
void |
setScheme(java.lang.String scheme)
Sets the name of the scheme used to make this request, for example, http, https, or ftp. |
void |
setSecure(boolean isSecure)
Sets a boolean indicating whether this request was made using a secure channel, such as HTTPS. |
void |
setServerName(java.lang.String serverName)
Sets the host name of the server that received the request. |
void |
setServerPort(int serverPort)
Sets the port number on which this request was received. |
void |
setServletPath(java.lang.String servletPath)
Sets the part of this request's URL that calls the servlet. |
void |
setSession(HttpSession session)
Sets the session associated with this request |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HttpRequest(java.lang.String name)
name
- Name of the HttpRequestpublic HttpRequest()
Method Detail |
public java.lang.String getMethod()
public void setMethod(java.lang.String method)
method
- the HTTP method of the HttpRequestpublic java.lang.String getPathInfo()
public void setPathInfo(java.lang.String pathInfo)
pathInfo
- a String, decoded by the web container, specifying extra path information
that comes after the servlet path but before the query string in the request URL; or null
if the URL does not have any extra path informationpublic java.lang.String getQueryString()
public void setQueryString(java.lang.String queryString)
queryString
- a String containing the query stringpublic java.lang.String getRequestedSessionId()
public void setRequestedSessionId(java.lang.String requestedSessionId)
requestedSessionId
- a String specifying the session ID, or null if the request
did not specify a session IDpublic java.lang.String getRequestURL()
public void setRequestURL(java.lang.String requestURL)
requestURL
- the requested URLpublic java.lang.String getServletPath()
public void setServletPath(java.lang.String servletPath)
servletPath
- a String containing the name or path of the servlet being called, as
specified in the request URL, decoded.public java.lang.String getRequestURI()
First line of HTTP request | Returned Value |
POST /some/path.html HTTP/1.1 | /some/path.html |
GET http://foo.bar/a.html HTTP/1.0 | /a.html |
HEAD /xyz?a=b HTTP/1.1 | /xyz |
public void setRequestURI(java.lang.String requestURI)
requestURI
- a String containing the part of the URL from the protocol name up
to the query stringpublic java.lang.String getRemoteUser()
public void setRemoteUser(java.lang.String remoteUser)
remoteUser
- a String specifying the login of the user making this request, or nullpublic java.util.Hashtable getCookies()
public void setCookies(java.util.Hashtable cookies)
cookies
- a Hashtable of all teh Cookies included with this requestpublic Cookie getCookie(java.lang.String name)
name
- the cookies name
public void setCookie(java.lang.String name, Cookie cookie)
name
- identifier of the Cookiecookie
- Cookie objectpublic java.lang.String getContextPath()
public void setContextPath(java.lang.String contextPath)
contextPath
- a String specifying the protion of the request URI that indicates
the context of the requestpublic java.lang.String getAuthType()
public void setAuthType(java.lang.String authType)
authType
- a String specifying the authentication schemepublic void setAttributes(java.util.Hashtable attributes)
Hashtable
.
attributes
- the attributes of this request as Hashtable
public java.util.Hashtable getAttributes()
Hashtable
Hashtable
public void setAttribute(java.lang.String name, java.lang.Object obj)
name
- a String specifying the name of the attributeobj
- the Object to be storedpublic java.lang.Object getAttribute(java.lang.String name)
name
- a String specifying the name of the attribute
public java.util.Enumeration getAttributeNames()
Enumeration
of strings containing the names of the request's
attributespublic void setParameters(java.util.Hashtable parameters)
Hashtable
.
parameters
- the parameters of this request as Hashtable
public java.util.Hashtable getParameters()
Hashtable
Hashtable
public void setParameter(java.lang.String name, java.lang.Object obj)
name
- a String specifying the name of the parameterobj
- a Object (String or String[]) representing the value of the parameterpublic java.lang.Object getParameter(java.lang.String name)
name
- a String specifying the name of the parameter
public java.util.Enumeration getParameterNames()
public java.lang.String getName()
public void setName(java.lang.String name)
name
- the Identificationname of the HttpRequestpublic java.lang.String getContentType()
public void setContentType(java.lang.String contentType)
contentType
- a String containing the name of the MIME type of the request,
or null if the type is not knownpublic java.lang.String getProtocol()
public void setProtocol(java.lang.String protocol)
protocol
- a String containing the protocol name and version numberpublic java.lang.String getRemoteAddr()
public void setRemoteAddr(java.lang.String remoteAddr)
remoteAddr
- a String containing the IP address of the client that sent the requestpublic java.lang.String getRemoteHost()
public void setRemoteHost(java.lang.String remoteHost)
remoteHost
- a String containing the fully qualified name of the clientpublic java.lang.String getScheme()
public void setScheme(java.lang.String scheme)
scheme
- a String containing the name of the scheme used to make this requestpublic java.lang.String getServerName()
public void setServerName(java.lang.String serverName)
serverName
- a String containing the name of the server to which the request was sentpublic int getServerPort()
public void setServerPort(int serverPort)
serverPort
- an integer specifying the port numberpublic boolean isSecure()
public void setSecure(boolean isSecure)
isSecure
- a boolean indicating if the request was made using a secure channelpublic HttpSession getSession()
public void setSession(HttpSession session)
session
- the HttpSession associated with this request
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |