Java Doc for AbstractHttpServletRequestWrapper.java in  » Testing » jakarta-cactus » org » apache » cactus » server » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » jakarta cactus » org.apache.cactus.server 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.cactus.server.AbstractHttpServletRequestWrapper

All known Subclasses:   org.apache.cactus.server.AbstractHttpServletRequestWrapper23,
AbstractHttpServletRequestWrapper
abstract public class AbstractHttpServletRequestWrapper implements HttpServletRequest(Code)
Abstract wrapper around HttpServletRequest . This class provides a common implementation of the wrapper for the different Servlet APIs. This is an implementation that delegates all the call to the HttpServletRequest object passed in the constructor except for some overidden methods which are use to simulate a URL. This is to be able to simulate any URL that would have been used to call the test method : if this was not done, the URL that would be returned (by calling the HttpServletRequest.getRequestURI method or others alike) would be the URL of the Cactus redirector servlet and not a URL that the test case want to simulate.
version:
   $Id: AbstractHttpServletRequestWrapper.java 238993 2004-05-22 16:39:34Z vmassol $


Field Summary
protected  StringremoteHostName
    
protected  StringremoteIPAddress
    
protected  StringremoteUser
    
protected  HttpServletRequestrequest
    
protected  ServletURLurl
    

Constructor Summary
public  AbstractHttpServletRequestWrapper(HttpServletRequest theRequest, ServletURL theURL)
     Construct an HttpServletRequest instance that delegates it's method calls to the request object passed as parameter and that uses the URL passed as parameter to simulate a URL from which the request would come from.

Method Summary
public  ObjectgetAttribute(String theName)
    
public  EnumerationgetAttributeNames()
    
public  StringgetAuthType()
    
public  StringgetCharacterEncoding()
    
public  intgetContentLength()
    
public  StringgetContentType()
    
public  StringgetContextPath()
     the context path from the simulated URL or the real context pathif a simulation URL has not been defined.
public  Cookie[]getCookies()
    
public  longgetDateHeader(String theName)
    
public  StringgetHeader(String theName)
    
public  EnumerationgetHeaderNames()
    
public  EnumerationgetHeaders(String theName)
    
public  ServletInputStreamgetInputStream()
    
public  intgetIntHeader(String theName)
    
public  LocalegetLocale()
    
public  EnumerationgetLocales()
    
public  StringgetMethod()
    
public  HttpServletRequestgetOriginalRequest()
    
public  StringgetParameter(String theName)
    
public  EnumerationgetParameterNames()
    
public  String[]getParameterValues(String theName)
    
public  StringgetPathInfo()
    
public  StringgetPathTranslated()
    
public  StringgetProtocol()
    
public  StringgetQueryString()
    
public  BufferedReadergetReader()
    
public  StringgetRealPath(String thePath)
    
public  StringgetRemoteAddr()
    
public  StringgetRemoteHost()
    
public  StringgetRemoteUser()
    
public  RequestDispatchergetRequestDispatcher(String thePath)
    
public  StringgetRequestURI()
    
public  StringgetRequestedSessionId()
    
public  StringgetScheme()
    
public  StringgetServerName()
     the server name from the simulated URL or the real server nameif a simulation URL has not been defined.
public  intgetServerPort()
     the server port number from the simulated URL or the real serverport number if a simulation URL has not been defined.
public  StringgetServletPath()
     the servlet path from the simulated URL or the real servlet pathif a simulation URL has not been defined.
public  HttpSessiongetSession()
    
public  HttpSessiongetSession(boolean isCreate)
    
public  PrincipalgetUserPrincipal()
    
public  booleanisRequestedSessionIdFromCookie()
    
public  booleanisRequestedSessionIdFromURL()
    
public  booleanisRequestedSessionIdFromUrl()
    
public  booleanisRequestedSessionIdValid()
    
public  booleanisSecure()
    
public  booleanisUserInRole(String theRole)
    
public  voidremoveAttribute(String theName)
    
public  voidsetAttribute(String theName, Object theAttribute)
    
public  voidsetRemoteHostName(String theRemoteHostName)
     Simulates the remote host name(ie the client host name).
public  voidsetRemoteIPAddress(String theRemoteIPAddress)
     Simulates the remote IP address (ie the client IP address).
public  voidsetRemoteUser(String theRemoteUser)
     Sets the remote user name to simulate.

Field Detail
remoteHostName
protected String remoteHostName(Code)
Remote Host name to simulate (if any)
See Also:   AbstractHttpServletRequestWrapper.setRemoteHostName(String)



remoteIPAddress
protected String remoteIPAddress(Code)
Remote IP address to simulate (if any)
See Also:   AbstractHttpServletRequestWrapper.setRemoteIPAddress(String)



remoteUser
protected String remoteUser(Code)
Remote user to simulate (if any)
See Also:   AbstractHttpServletRequestWrapper.setRemoteUser(String)



request
protected HttpServletRequest request(Code)
The real HTTP request



url
protected ServletURL url(Code)
The URL to simulate




Constructor Detail
AbstractHttpServletRequestWrapper
public AbstractHttpServletRequestWrapper(HttpServletRequest theRequest, ServletURL theURL)(Code)
Construct an HttpServletRequest instance that delegates it's method calls to the request object passed as parameter and that uses the URL passed as parameter to simulate a URL from which the request would come from.
Parameters:
  theRequest - the real HTTP request
Parameters:
  theURL - the URL to simulate or null if none




Method Detail
getAttribute
public Object getAttribute(String theName)(Code)

See Also:   HttpServletRequest.getAttribute(String)



getAttributeNames
public Enumeration getAttributeNames()(Code)

See Also:   HttpServletRequest.getAttributeNames



getAuthType
public String getAuthType()(Code)

See Also:   HttpServletRequest.getAuthType



getCharacterEncoding
public String getCharacterEncoding()(Code)

See Also:   HttpServletRequest.getCharacterEncoding



getContentLength
public int getContentLength()(Code)

See Also:   HttpServletRequest.getContentLength



getContentType
public String getContentType()(Code)

See Also:   HttpServletRequest.getContentType



getContextPath
public String getContextPath()(Code)
the context path from the simulated URL or the real context pathif a simulation URL has not been defined. The real context pathwill be returned if the context path defined in the simulated URL has a null value.



getCookies
public Cookie[] getCookies()(Code)

See Also:   HttpServletRequest.getCookies



getDateHeader
public long getDateHeader(String theName)(Code)

See Also:   HttpServletRequest.getDateHeader(String)



getHeader
public String getHeader(String theName)(Code)

See Also:   HttpServletRequest.getHeader(String)



getHeaderNames
public Enumeration getHeaderNames()(Code)

See Also:   HttpServletRequest.getHeaderNames



getHeaders
public Enumeration getHeaders(String theName)(Code)

See Also:   HttpServletRequest.getHeaders(String)



getInputStream
public ServletInputStream getInputStream() throws IOException(Code)

See Also:   HttpServletRequest.getInputStream



getIntHeader
public int getIntHeader(String theName)(Code)

See Also:   HttpServletRequest.getIntHeader(String)



getLocale
public Locale getLocale()(Code)

See Also:   HttpServletRequest.getLocale



getLocales
public Enumeration getLocales()(Code)

See Also:   HttpServletRequest.getLocales



getMethod
public String getMethod()(Code)

See Also:   HttpServletRequest.getMethod



getOriginalRequest
public HttpServletRequest getOriginalRequest()(Code)
the original request object



getParameter
public String getParameter(String theName)(Code)

See Also:   HttpServletRequest.getParameter(String)



getParameterNames
public Enumeration getParameterNames()(Code)

See Also:   HttpServletRequest.getParameterNames



getParameterValues
public String[] getParameterValues(String theName)(Code)

See Also:   HttpServletRequest.getParameterValues(String)



getPathInfo
public String getPathInfo()(Code)
the path info from the simulated URL or the real path infoif a simulation URL has not been defined.



getPathTranslated
public String getPathTranslated()(Code)
any extra path information after the servlet name butbefore the query string, and translates it to a real path.Takes into account the simulated URL (if any).



getProtocol
public String getProtocol()(Code)

See Also:   HttpServletRequest.getProtocol



getQueryString
public String getQueryString()(Code)
the query string from the simulated URL or the real querystring if a simulation URL has not been defined.



getReader
public BufferedReader getReader() throws IOException(Code)

See Also:   HttpServletRequest.getReader



getRealPath
public String getRealPath(String thePath)(Code)

See Also:   HttpServletRequest.getRealPath(String)



getRemoteAddr
public String getRemoteAddr()(Code)
the simulated remote IP address if any or the real one.
See Also:   HttpServletRequest.getRemoteAddr



getRemoteHost
public String getRemoteHost()(Code)
the simulated remote host name if any or the real one.
See Also:   HttpServletRequest.getRemoteHost



getRemoteUser
public String getRemoteUser()(Code)
the simulated remote user name if any or the real one.
See Also:   HttpServletRequest.getRemoteUser



getRequestDispatcher
public RequestDispatcher getRequestDispatcher(String thePath)(Code)

Parameters:
  thePath - the path to the resource a wrapped request dispatcher instead of the real one, so thatforward() and include() calls will use the wrapped dispatcherpassing it the *original* request [this is needed for someservlet engine like Tomcat 3.x which do not support the newmechanism introduced by Servlet 2.3 Filters].
See Also:   HttpServletRequest.getRequestDispatcher(String)



getRequestURI
public String getRequestURI()(Code)
the URI from the simulated URL or the real URIif a simulation URL has not been defined.



getRequestedSessionId
public String getRequestedSessionId()(Code)

See Also:   HttpServletRequest.getRequestedSessionId



getScheme
public String getScheme()(Code)

See Also:   HttpServletRequest.getScheme



getServerName
public String getServerName()(Code)
the server name from the simulated URL or the real server nameif a simulation URL has not been defined. If the server namedefined in the simulation URL is null, return the real servername.



getServerPort
public int getServerPort()(Code)
the server port number from the simulated URL or the real serverport number if a simulation URL has not been defined. If noport is defined in the simulation URL, then port 80 is returned.If the server name has been defined with a null value inin the simulation URL, return the real server port.



getServletPath
public String getServletPath()(Code)
the servlet path from the simulated URL or the real servlet pathif a simulation URL has not been defined. The real servlet pathwill be returned if the servlet path defined in the simulated URL has a null value.



getSession
public HttpSession getSession()(Code)

See Also:   HttpServletRequest.getSession



getSession
public HttpSession getSession(boolean isCreate)(Code)

See Also:   HttpServletRequest.getSession(boolean)



getUserPrincipal
public Principal getUserPrincipal()(Code)

See Also:   HttpServletRequest.getUserPrincipal



isRequestedSessionIdFromCookie
public boolean isRequestedSessionIdFromCookie()(Code)

See Also:   HttpServletRequest.isRequestedSessionIdFromCookie



isRequestedSessionIdFromURL
public boolean isRequestedSessionIdFromURL()(Code)

See Also:   HttpServletRequest.isRequestedSessionIdFromURL



isRequestedSessionIdFromUrl
public boolean isRequestedSessionIdFromUrl()(Code)

See Also:   HttpServletRequest.isRequestedSessionIdFromUrl



isRequestedSessionIdValid
public boolean isRequestedSessionIdValid()(Code)

See Also:   HttpServletRequest.isRequestedSessionIdValid



isSecure
public boolean isSecure()(Code)

See Also:   HttpServletRequest.isSecure



isUserInRole
public boolean isUserInRole(String theRole)(Code)

See Also:   HttpServletRequest.isUserInRole(String)



removeAttribute
public void removeAttribute(String theName)(Code)

See Also:   HttpServletRequest.removeAttribute(String)



setAttribute
public void setAttribute(String theName, Object theAttribute)(Code)

See Also:   HttpServletRequest.setAttribute(StringObject)



setRemoteHostName
public void setRemoteHostName(String theRemoteHostName)(Code)
Simulates the remote host name(ie the client host name).
Parameters:
  theRemoteHostName - the simulated host name in string format.Exemple : "atlantis"



setRemoteIPAddress
public void setRemoteIPAddress(String theRemoteIPAddress)(Code)
Simulates the remote IP address (ie the client IP address).
Parameters:
  theRemoteIPAddress - the simulated IP address in string format.Exemple : "127.0.0.1"



setRemoteUser
public void setRemoteUser(String theRemoteUser)(Code)
Sets the remote user name to simulate.
Parameters:
  theRemoteUser - the simulated remote user name



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.