Java Doc for Request.java in  » Sevlet-Container » jetty-modules » org » mortbay » jetty » 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 » Sevlet Container » jetty modules » org.mortbay.jetty 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.mortbay.jetty.Request

Request
public class Request implements HttpServletRequest(Code)
Jetty Request.

Implements javax.servlet.HttpServletRequest from the javax.servlet package.

The standard interface of mostly getters, is extended with setters so that the request is mutable by the handlers that it is passed to. This allows the request object to be as lightweight as possible and not actually implement any significant behaviour. For example

  • The getContextPath method will return null, until the requeset has been passed to a ContextHandler which matches the getPathInfo with a context path and calls setContextPath as a result.
  • the HTTP session methods will all return null sessions until such time as a request has been passed to a org.mortbay.jetty.servlet.SessionHandler which checks for session cookies and enables the ability to create new sessions.
  • The getServletPath method will return null until the request has been passed to a org.mortbay.jetty.servlet.ServletHandler and the pathInfo matched against the servlet URL patterns and setServletPath called as a result.
A request instance is created for each HttpConnection accepted by the server and recycled for each HTTP request received via that connection. An effort is made to avoid reparsing headers and cookies that are likely to be the same for requests from the same connection.
author:
   gregw



Constructor Summary
public  Request(HttpConnection connection)
    

Method Summary
public synchronized  voidaddEventListener(EventListener listener)
    
public  ObjectgetAttribute(String name)
    
public  EnumerationgetAttributeNames()
    
public  AttributesgetAttributes()
    
public  StringgetAuthType()
    
public  StringgetCharacterEncoding()
    
public  HttpConnectiongetConnection()
    
public  intgetContentLength()
    
public  StringgetContentType()
    
public  SContextgetContext()
     The current SContext context used for this request, or null if Request.setContext has not yetbeen called.
public  StringgetContextPath()
    
public  ContinuationgetContinuation()
    
public  ContinuationgetContinuation(boolean create)
    
public  Cookie[]getCookies()
    
public  longgetDateHeader(String name)
    
public  StringgetHeader(String name)
    
public  EnumerationgetHeaderNames()
    
public  EnumerationgetHeaders(String name)
    
public  intgetInputState()
    
public  ServletInputStreamgetInputStream()
    
public  intgetIntHeader(String name)
    
public  StringgetLocalAddr()
    
public  StringgetLocalName()
    
public  intgetLocalPort()
    
public  LocalegetLocale()
    
public  EnumerationgetLocales()
    
public  StringgetMethod()
    
public  StringgetParameter(String name)
    
public  MapgetParameterMap()
    
public  EnumerationgetParameterNames()
    
public  String[]getParameterValues(String name)
    
public  MultiMapgetParameters()
    
public  StringgetPathInfo()
    
public  StringgetPathTranslated()
    
public  StringgetProtocol()
    
public  StringgetQueryEncoding()
    
public  StringgetQueryString()
    
public  BufferedReadergetReader()
    
public  StringgetRealPath(String path)
    
public  StringgetRemoteAddr()
    
public  StringgetRemoteHost()
    
public  intgetRemotePort()
    
public  StringgetRemoteUser()
    
public static  RequestgetRequest(HttpServletRequest request)
    
public  RequestDispatchergetRequestDispatcher(String path)
    
public  StringgetRequestURI()
    
public  StringBuffergetRequestURL()
    
public  StringgetRequestedSessionId()
    
public  MapgetRoleMap()
    
public  StringBuffergetRootURL()
     Reconstructs the URL the client used to make the request.
public  StringgetScheme()
    
public  StringgetServerName()
    
public  intgetServerPort()
    
public  StringgetServletName()
    
public  StringgetServletPath()
    
public  HttpSessiongetSession()
    
public  HttpSessiongetSession(boolean create)
    
public  SessionManagergetSessionManager()
    
public  longgetTimeStamp()
    
public  StringgetTimeStampStr()
    
public  HttpURIgetUri()
    
public  PrincipalgetUserPrincipal()
    
public  UserRealmgetUserRealm()
    
public  booleanisHandled()
    
public  booleanisRequestedSessionIdFromCookie()
    
public  booleanisRequestedSessionIdFromURL()
    
public  booleanisRequestedSessionIdFromUrl()
    
public  booleanisRequestedSessionIdValid()
    
public  booleanisSecure()
    
public  booleanisUserInRole(String role)
    
public  HttpSessionrecoverNewSession(Object key)
    
protected  voidrecycle()
    
public  voidremoveAttribute(String name)
    
public synchronized  voidremoveEventListener(EventListener listener)
    
public  voidsaveNewSession(Object key, HttpSession session)
    
public  voidsetAttribute(String name, Object value)
    
public  voidsetAttributes(Attributes attributes)
    
public  voidsetAuthType(String authType)
    
public  voidsetCharacterEncoding(String encoding)
    
public  voidsetCharacterEncodingUnchecked(String encoding)
    
public  voidsetContentType(String contentType)
    
public  voidsetContext(SContext context)
    
public  voidsetContextPath(String contextPath)
    
 voidsetContinuation(Continuation cont)
    
public  voidsetCookies(Cookie[] cookies)
    
public  voidsetHandled(boolean h)
    
public  voidsetMethod(String method)
    
public  voidsetParameters(MultiMap parameters)
    
public  voidsetPathInfo(String pathInfo)
    
public  voidsetProtocol(String protocol)
    
public  voidsetQueryEncoding(String queryEncoding)
     Set the character encoding used for the query string.
public  voidsetQueryString(String queryString)
    
public  voidsetRequestURI(String requestURI)
    
public  voidsetRequestedSessionId(String requestedSessionId)
    
public  voidsetRequestedSessionIdFromCookie(boolean requestedSessionIdCookie)
    
public  voidsetRoleMap(Map map)
    
public  voidsetScheme(String scheme)
    
public  voidsetServerName(String host)
    
public  voidsetServerPort(int port)
    
public  voidsetServletName(String name)
    
public  voidsetServletPath(String servletPath)
    
public  voidsetSession(HttpSession session)
    
public  voidsetSessionManager(SessionManager sessionManager)
    
public  voidsetTimeStamp(long ts)
    
public  voidsetUri(HttpURI uri)
    
public  voidsetUserPrincipal(Principal userPrincipal)
    
public  voidsetUserRealm(UserRealm userRealm)
    
public  StringtoString()
    


Constructor Detail
Request
public Request(HttpConnection connection)(Code)




Method Detail
addEventListener
public synchronized void addEventListener(EventListener listener)(Code)



getAttribute
public Object getAttribute(String name)(Code)



getAttributeNames
public Enumeration getAttributeNames()(Code)



getAttributes
public Attributes getAttributes()(Code)



getAuthType
public String getAuthType()(Code)



getCharacterEncoding
public String getCharacterEncoding()(Code)



getConnection
public HttpConnection getConnection()(Code)
Returns the connection.



getContentLength
public int getContentLength()(Code)



getContentType
public String getContentType()(Code)



getContext
public SContext getContext()(Code)
The current SContext context used for this request, or null if Request.setContext has not yetbeen called.



getContextPath
public String getContextPath()(Code)



getContinuation
public Continuation getContinuation()(Code)



getContinuation
public Continuation getContinuation(boolean create)(Code)



getCookies
public Cookie[] getCookies()(Code)



getDateHeader
public long getDateHeader(String name)(Code)



getHeader
public String getHeader(String name)(Code)



getHeaderNames
public Enumeration getHeaderNames()(Code)



getHeaders
public Enumeration getHeaders(String name)(Code)



getInputState
public int getInputState()(Code)
Returns the inputState.



getInputStream
public ServletInputStream getInputStream() throws IOException(Code)



getIntHeader
public int getIntHeader(String name)(Code)



getLocalAddr
public String getLocalAddr()(Code)



getLocalName
public String getLocalName()(Code)



getLocalPort
public int getLocalPort()(Code)



getLocale
public Locale getLocale()(Code)



getLocales
public Enumeration getLocales()(Code)



getMethod
public String getMethod()(Code)



getParameter
public String getParameter(String name)(Code)



getParameterMap
public Map getParameterMap()(Code)



getParameterNames
public Enumeration getParameterNames()(Code)



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



getParameters
public MultiMap getParameters()(Code)
Returns the parameters.



getPathInfo
public String getPathInfo()(Code)



getPathTranslated
public String getPathTranslated()(Code)



getProtocol
public String getProtocol()(Code)



getQueryEncoding
public String getQueryEncoding()(Code)



getQueryString
public String getQueryString()(Code)



getReader
public BufferedReader getReader() throws IOException(Code)



getRealPath
public String getRealPath(String path)(Code)



getRemoteAddr
public String getRemoteAddr()(Code)



getRemoteHost
public String getRemoteHost()(Code)



getRemotePort
public int getRemotePort()(Code)



getRemoteUser
public String getRemoteUser()(Code)



getRequest
public static Request getRequest(HttpServletRequest request)(Code)



getRequestDispatcher
public RequestDispatcher getRequestDispatcher(String path)(Code)



getRequestURI
public String getRequestURI()(Code)



getRequestURL
public StringBuffer getRequestURL()(Code)



getRequestedSessionId
public String getRequestedSessionId()(Code)



getRoleMap
public Map getRoleMap()(Code)



getRootURL
public StringBuffer getRootURL()(Code)
Reconstructs the URL the client used to make the request. The returned URL contains a protocol, server name, port number, and, but it does not include a path.

Because this method returns a StringBuffer, not a string, you can modify the URL easily, for example, to append path and query parameters. This method is useful for creating redirect messages and for reporting errors. "scheme://host:port"




getScheme
public String getScheme()(Code)



getServerName
public String getServerName()(Code)



getServerPort
public int getServerPort()(Code)



getServletName
public String getServletName()(Code)



getServletPath
public String getServletPath()(Code)



getSession
public HttpSession getSession()(Code)



getSession
public HttpSession getSession(boolean create)(Code)



getSessionManager
public SessionManager getSessionManager()(Code)
Returns the sessionManager.



getTimeStamp
public long getTimeStamp()(Code)
Get Request TimeStamp The time that the request was received.



getTimeStampStr
public String getTimeStampStr()(Code)
Get Request TimeStamp The time that the request was received.



getUri
public HttpURI getUri()(Code)
Returns the uri.



getUserPrincipal
public Principal getUserPrincipal()(Code)



getUserRealm
public UserRealm getUserRealm()(Code)
Returns the userRealm.



isHandled
public boolean isHandled()(Code)



isRequestedSessionIdFromCookie
public boolean isRequestedSessionIdFromCookie()(Code)



isRequestedSessionIdFromURL
public boolean isRequestedSessionIdFromURL()(Code)



isRequestedSessionIdFromUrl
public boolean isRequestedSessionIdFromUrl()(Code)



isRequestedSessionIdValid
public boolean isRequestedSessionIdValid()(Code)



isSecure
public boolean isSecure()(Code)



isUserInRole
public boolean isUserInRole(String role)(Code)



recoverNewSession
public HttpSession recoverNewSession(Object key)(Code)



recycle
protected void recycle()(Code)



removeAttribute
public void removeAttribute(String name)(Code)



removeEventListener
public synchronized void removeEventListener(EventListener listener)(Code)



saveNewSession
public void saveNewSession(Object key, HttpSession session)(Code)



setAttribute
public void setAttribute(String name, Object value)(Code)



setAttributes
public void setAttributes(Attributes attributes)(Code)



setAuthType
public void setAuthType(String authType)(Code)

Parameters:
  authType - The authType to set.



setCharacterEncoding
public void setCharacterEncoding(String encoding) throws UnsupportedEncodingException(Code)



setCharacterEncodingUnchecked
public void setCharacterEncodingUnchecked(String encoding)(Code)



setContentType
public void setContentType(String contentType)(Code)



setContext
public void setContext(SContext context)(Code)

Parameters:
  context -



setContextPath
public void setContextPath(String contextPath)(Code)
Sets the "context path" for this request
See Also:   HttpServletRequest.getContextPath



setContinuation
void setContinuation(Continuation cont)(Code)



setCookies
public void setCookies(Cookie[] cookies)(Code)

Parameters:
  cookies - The cookies to set.



setHandled
public void setHandled(boolean h)(Code)



setMethod
public void setMethod(String method)(Code)

Parameters:
  method - The method to set.



setParameters
public void setParameters(MultiMap parameters)(Code)

Parameters:
  parameters - The parameters to set.



setPathInfo
public void setPathInfo(String pathInfo)(Code)

Parameters:
  pathInfo - The pathInfo to set.



setProtocol
public void setProtocol(String protocol)(Code)

Parameters:
  protocol - The protocol to set.



setQueryEncoding
public void setQueryEncoding(String queryEncoding)(Code)
Set the character encoding used for the query string. This call will effect the return of getQueryString and getParamaters. It must be called before any geParameter methods. The request attribute "org.mortbay.jetty.Request.queryEncoding" may be set as an alternate method of calling setQueryEncoding.
Parameters:
  queryEncoding -



setQueryString
public void setQueryString(String queryString)(Code)

Parameters:
  queryString - The queryString to set.



setRequestURI
public void setRequestURI(String requestURI)(Code)

Parameters:
  requestURI - The requestURI to set.



setRequestedSessionId
public void setRequestedSessionId(String requestedSessionId)(Code)

Parameters:
  requestedSessionId - The requestedSessionId to set.



setRequestedSessionIdFromCookie
public void setRequestedSessionIdFromCookie(boolean requestedSessionIdCookie)(Code)

Parameters:
  requestedSessionIdCookie - The requestedSessionIdCookie to set.



setRoleMap
public void setRoleMap(Map map)(Code)



setScheme
public void setScheme(String scheme)(Code)

Parameters:
  scheme - The scheme to set.



setServerName
public void setServerName(String host)(Code)

Parameters:
  host - The host to set.



setServerPort
public void setServerPort(int port)(Code)

Parameters:
  host - The host to set.



setServletName
public void setServletName(String name)(Code)

Parameters:
  name - The servletName to set.



setServletPath
public void setServletPath(String servletPath)(Code)

Parameters:
  servletPath - The servletPath to set.



setSession
public void setSession(HttpSession session)(Code)

Parameters:
  session - The session to set.



setSessionManager
public void setSessionManager(SessionManager sessionManager)(Code)

Parameters:
  sessionManager - The sessionManager to set.



setTimeStamp
public void setTimeStamp(long ts)(Code)



setUri
public void setUri(HttpURI uri)(Code)

Parameters:
  uri - The uri to set.



setUserPrincipal
public void setUserPrincipal(Principal userPrincipal)(Code)

Parameters:
  userPrincipal - The userPrincipal to set.



setUserRealm
public void setUserRealm(UserRealm userRealm)(Code)

Parameters:
  userRealm - The userRealm to set.



toString
public String toString()(Code)



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.