Java Doc for Request.java in  » Sevlet-Container » apache-tomcat-6.0.14 » org » apache » coyote » 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 » apache tomcat 6.0.14 » org.apache.coyote 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.coyote.Request

Request
final public class Request (Code)
This is a low-level, efficient representation of a server request. Most fields are GC-free, expensive operations are delayed until the user code needs the information. Processing is delegated to modules, using a hook mechanism. This class is not intended for user code - it is used internally by tomcat for processing the request in the most efficient way. Users ( servlets ) can access the information using a facade, which provides the high-level view of the request. For lazy evaluation, the request uses the getInfo() hook. The following ids are defined:
  • req.encoding - returns the request encoding
  • req.attribute - returns a module-specific attribute ( like SSL keys, etc ).
Tomcat defines a number of attributes:
  • "org.apache.tomcat.request" - allows access to the low-level request object in trusted applications

author:
   James Duncan Davidson [duncan@eng.sun.com]
author:
   James Todd [gonzo@eng.sun.com]
author:
   Jason Hunter [jch@eng.sun.com]
author:
   Harish Prabandham
author:
   Alex Cruikshank [alex@epitonic.com]
author:
   Hans Bergsten [hans@gefionsoftware.com]
author:
   Costin Manolache
author:
   Remy Maucherat



Constructor Summary
public  Request()
    

Method Summary
public  voidaction(ActionCode actionCode, Object param)
    
public  MessageBytescontentType()
    
public  MessageBytesdecodedURI()
    
public  intdoRead(ByteChunk chunk)
     Read data from the input buffer and put it into a byte chunk. The buffer is owned by the protocol implementation - it will be reused on the next read. The Adapter must either process the data in place or copy it to a separate buffer if it needs to hold it.
public  ObjectgetAttribute(String name)
    
public  HashMapgetAttributes()
    
public  MessageBytesgetAuthType()
    
public  intgetAvailable()
    
public  intgetBytesRead()
    
public  StringgetCharacterEncoding()
     Get the character encoding used for this request.
public  intgetContentLength()
    
public  longgetContentLengthLong()
    
public  StringgetContentType()
    
public  CookiesgetCookies()
    
public  StringgetHeader(String name)
    
public  InputBuffergetInputBuffer()
    
public  intgetLocalPort()
    
public  MimeHeadersgetMimeHeaders()
    
final public  ObjectgetNote(int pos)
    
public  ParametersgetParameters()
    
public  intgetRemotePort()
    
public  MessageBytesgetRemoteUser()
    
public  RequestInfogetRequestProcessor()
    
public  ResponsegetResponse()
    
public  intgetServerPort()
    
public  longgetStartTime()
    
public  UDecodergetURLDecoder()
    
public  MessageBytesinstanceId()
     Get the instance id (or JVM route).
public  MessageByteslocalAddr()
    
public  MessageByteslocalName()
    
public  MessageBytesmethod()
    
public  MessageBytesprotocol()
    
public  MessageBytesquery()
    
public  MessageBytesqueryString()
    
public  voidrecycle()
    
public  MessageBytesremoteAddr()
    
public  MessageBytesremoteHost()
    
public  MessageBytesrequestURI()
    
public  MessageBytesscheme()
    
public  MessageBytesserverName()
     Return the buffer holding the server name, if any.
public  voidsetAttribute(String name, Object o)
    
public  voidsetAvailable(int available)
    
public  voidsetBytesRead(int bytesRead)
    
public  voidsetCharacterEncoding(String enc)
    
public  voidsetContentLength(int len)
    
public  voidsetContentType(String type)
    
public  voidsetContentType(MessageBytes mb)
    
public  voidsetInputBuffer(InputBuffer inputBuffer)
    
public  voidsetLocalPort(int port)
    
final public  voidsetNote(int pos, Object value)
     Used to store private data.
public  voidsetRemotePort(int port)
    
public  voidsetResponse(Response response)
    
public  voidsetServerPort(int serverPort)
    
public  voidsetStartTime(long startTime)
    
public  StringtoString()
    
public  MessageBytesunparsedURI()
    
public  voidupdateCounters()
    


Constructor Detail
Request
public Request()(Code)




Method Detail
action
public void action(ActionCode actionCode, Object param)(Code)



contentType
public MessageBytes contentType()(Code)



decodedURI
public MessageBytes decodedURI()(Code)



doRead
public int doRead(ByteChunk chunk) throws IOException(Code)
Read data from the input buffer and put it into a byte chunk. The buffer is owned by the protocol implementation - it will be reused on the next read. The Adapter must either process the data in place or copy it to a separate buffer if it needs to hold it. In most cases this is done during byte->char conversions or via InputStream. Unlike InputStream, this interface allows the app to process data in place, without copy.



getAttribute
public Object getAttribute(String name)(Code)



getAttributes
public HashMap getAttributes()(Code)



getAuthType
public MessageBytes getAuthType()(Code)



getAvailable
public int getAvailable()(Code)



getBytesRead
public int getBytesRead()(Code)



getCharacterEncoding
public String getCharacterEncoding()(Code)
Get the character encoding used for this request.



getContentLength
public int getContentLength()(Code)



getContentLengthLong
public long getContentLengthLong()(Code)



getContentType
public String getContentType()(Code)



getCookies
public Cookies getCookies()(Code)



getHeader
public String getHeader(String name)(Code)



getInputBuffer
public InputBuffer getInputBuffer()(Code)



getLocalPort
public int getLocalPort()(Code)



getMimeHeaders
public MimeHeaders getMimeHeaders()(Code)



getNote
final public Object getNote(int pos)(Code)



getParameters
public Parameters getParameters()(Code)



getRemotePort
public int getRemotePort()(Code)



getRemoteUser
public MessageBytes getRemoteUser()(Code)



getRequestProcessor
public RequestInfo getRequestProcessor()(Code)



getResponse
public Response getResponse()(Code)



getServerPort
public int getServerPort()(Code)



getStartTime
public long getStartTime()(Code)



getURLDecoder
public UDecoder getURLDecoder()(Code)



instanceId
public MessageBytes instanceId()(Code)
Get the instance id (or JVM route). Curently Ajp is sending it with each request. In future this should be fixed, and sent only once ( or 'negociated' at config time so both tomcat and apache share the same name. the instance id



localAddr
public MessageBytes localAddr()(Code)



localName
public MessageBytes localName()(Code)



method
public MessageBytes method()(Code)



protocol
public MessageBytes protocol()(Code)



query
public MessageBytes query()(Code)



queryString
public MessageBytes queryString()(Code)



recycle
public void recycle()(Code)



remoteAddr
public MessageBytes remoteAddr()(Code)



remoteHost
public MessageBytes remoteHost()(Code)



requestURI
public MessageBytes requestURI()(Code)



scheme
public MessageBytes scheme()(Code)



serverName
public MessageBytes serverName()(Code)
Return the buffer holding the server name, if any. Use isNull() to check if there is no value set. This is the "virtual host", derived from the Host: header.



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



setAvailable
public void setAvailable(int available)(Code)



setBytesRead
public void setBytesRead(int bytesRead)(Code)



setCharacterEncoding
public void setCharacterEncoding(String enc)(Code)



setContentLength
public void setContentLength(int len)(Code)



setContentType
public void setContentType(String type)(Code)



setContentType
public void setContentType(MessageBytes mb)(Code)



setInputBuffer
public void setInputBuffer(InputBuffer inputBuffer)(Code)



setLocalPort
public void setLocalPort(int port)(Code)



setNote
final public void setNote(int pos, Object value)(Code)
Used to store private data. Thread data could be used instead - but if you have the req, getting/setting a note is just a array access, may be faster than ThreadLocal for very frequent operations. Example use: Jk: HandlerRequest.HOSTBUFFER = 10 CharChunk, buffer for Host decoding WorkerEnv: SSL_CERT_NOTE=16 - MessageBytes containing the cert Catalina CoyoteAdapter: ADAPTER_NOTES = 1 - stores the HttpServletRequest object ( req/res) To avoid conflicts, note in the range 0 - 8 are reserved for the servlet container ( catalina connector, etc ), and values in 9 - 16 for connector use. 17-31 range is not allocated or used.



setRemotePort
public void setRemotePort(int port)(Code)



setResponse
public void setResponse(Response response)(Code)



setServerPort
public void setServerPort(int serverPort)(Code)



setStartTime
public void setStartTime(long startTime)(Code)



toString
public String toString()(Code)



unparsedURI
public MessageBytes unparsedURI()(Code)



updateCounters
public void updateCounters()(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.