Java Doc for HttpRequest.java in  » EJB-Server-resin-3.1.5 » resin » com » caucho » server » http » 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 » EJB Server resin 3.1.5 » resin » com.caucho.server.http 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.caucho.server.connection.AbstractHttpRequest
      com.caucho.server.http.HttpRequest

All known Subclasses:   com.caucho.protocols.flash.SocketPolicyRequest,  com.caucho.server.http.CompileRequest,
HttpRequest
public class HttpRequest extends AbstractHttpRequest implements ServerRequest(Code)
Handles a new request from an HTTP connection.


Field Summary
final static  intHTTP_0_9
    
final static  intHTTP_1_0
    
final static  intHTTP_1_1
    
final static  CharBuffer_getCb
    
final static  CharBuffer_headCb
    
final static  char[]_hostCb
    
final static  CharBuffer_http10Cb
    
final static  CharBuffer_http11Cb
    
final static  CharBuffer_postCb
    
final static  char[]_userAgentCb
    
final static  Loggerlog
    

Constructor Summary
public  HttpRequest(DispatchServer server, Connection conn)
     Creates a new HttpRequest.

Method Summary
protected  booleancheckLogin()
    
protected  StringdbgId()
    
public  StringfindSessionIdFromConnection()
     For SSL connections, use the SSL identifier.
public  voidfinish()
    
public  ObjectgetAttribute(String name)
     Returns the named attribute.
public  Enumeration<String>getAttributeNames()
     Returns an enumeration of the attribute names.
public  StringgetHeader(String key)
     Returns the header.
public  CharSegmentgetHeaderBuffer(char[] testBuf, int length)
     Returns the matching header.
public  CharSegmentgetHeaderBuffer(String key)
     Returns the header value for the key, returned as a CharSegment.
public  voidgetHeaderBuffers(String key, ArrayList<CharSegment> values)
     Fills an ArrayList with the header values matching the key.
public  CharSegmentgetHeaderKey(int index)
    
public  EnumerationgetHeaderNames()
     Returns an enumeration of all the header keys.
public  intgetHeaderSize()
     Returns the number of headers.
public  CharSegmentgetHeaderValue(int index)
    
public  EnumerationgetHeaders(String key)
     Return an enumeration of headers matching a key.
Parameters:
  key - the header key to match.
protected  CharSequencegetHost()
    
public  StringgetMethod()
     Returns the header.
public  CharSegmentgetMethodBuffer()
     Returns a buffer containing the request method.
public  StringgetProtocol()
     Returns the protocol.
public  CharSegmentgetProtocolBuffer()
     Returns a char segment containing the protocol.
public  ReadStreamgetRawInput()
     Returns the raw input stream.
public  byte[]getUriBuffer()
    
public  intgetUriLength()
    
 intgetVersion()
     Returns the HTTP version of the request based on getProtocol().
public  booleanhandleRequest()
     Handles a new HTTP request.
public  booleanhandleResume()
     Handles a comet-style resume.
public  booleaninitStream(ReadStream readStream, ReadStream rawRead)
     Returns a stream for reading POST data.
public  booleanisSecure()
     Returns true for a secure connection.
public  booleanisTop()
    
final public  booleanisWaitForRead()
     Return true if the request waits for a read before beginning.
public  voidprotocolCloseEvent()
    
public  voidsetHeader(String key, String value)
     Adds a new header.
protected  voidskip()
    
protected  voidstart()
     Clear the request variables in preparation for a new request.
public  StringtoString()
    

Field Detail
HTTP_0_9
final static int HTTP_0_9(Code)



HTTP_1_0
final static int HTTP_1_0(Code)



HTTP_1_1
final static int HTTP_1_1(Code)



_getCb
final static CharBuffer _getCb(Code)



_headCb
final static CharBuffer _headCb(Code)



_hostCb
final static char[] _hostCb(Code)



_http10Cb
final static CharBuffer _http10Cb(Code)



_http11Cb
final static CharBuffer _http11Cb(Code)



_postCb
final static CharBuffer _postCb(Code)



_userAgentCb
final static char[] _userAgentCb(Code)



log
final static Logger log(Code)




Constructor Detail
HttpRequest
public HttpRequest(DispatchServer server, Connection conn)(Code)
Creates a new HttpRequest. New connections reuse the request.
Parameters:
  server - the owning server.




Method Detail
checkLogin
protected boolean checkLogin()(Code)



dbgId
protected String dbgId()(Code)



findSessionIdFromConnection
public String findSessionIdFromConnection()(Code)
For SSL connections, use the SSL identifier.



finish
public void finish() throws IOException(Code)
Cleans up at the end of the request



getAttribute
public Object getAttribute(String name)(Code)
Returns the named attribute.



getAttributeNames
public Enumeration<String> getAttributeNames()(Code)
Returns an enumeration of the attribute names.



getHeader
public String getHeader(String key)(Code)
Returns the header.



getHeaderBuffer
public CharSegment getHeaderBuffer(char[] testBuf, int length)(Code)
Returns the matching header.
Parameters:
  testBuf - header key
Parameters:
  length - length of the key.



getHeaderBuffer
public CharSegment getHeaderBuffer(String key)(Code)
Returns the header value for the key, returned as a CharSegment.



getHeaderBuffers
public void getHeaderBuffers(String key, ArrayList<CharSegment> values)(Code)
Fills an ArrayList with the header values matching the key.
Parameters:
  values - ArrayList which will contain the maching values.
Parameters:
  key - the header key to select.



getHeaderKey
public CharSegment getHeaderKey(int index)(Code)
Returns the header key



getHeaderNames
public Enumeration getHeaderNames()(Code)
Returns an enumeration of all the header keys.



getHeaderSize
public int getHeaderSize()(Code)
Returns the number of headers.



getHeaderValue
public CharSegment getHeaderValue(int index)(Code)
Returns the header value



getHeaders
public Enumeration getHeaders(String key)(Code)
Return an enumeration of headers matching a key.
Parameters:
  key - the header key to match. the enumeration of the headers.



getHost
protected CharSequence getHost()(Code)
Returns the virtual host of the request



getMethod
public String getMethod()(Code)
Returns the header.



getMethodBuffer
public CharSegment getMethodBuffer()(Code)
Returns a buffer containing the request method.



getProtocol
public String getProtocol()(Code)
Returns the protocol.



getProtocolBuffer
public CharSegment getProtocolBuffer()(Code)
Returns a char segment containing the protocol.



getRawInput
public ReadStream getRawInput()(Code)
Returns the raw input stream.



getUriBuffer
public byte[] getUriBuffer()(Code)
Returns the byte buffer containing the request URI



getUriLength
public int getUriLength()(Code)
Returns the length of the request URI



getVersion
int getVersion()(Code)
Returns the HTTP version of the request based on getProtocol().



handleRequest
public boolean handleRequest() throws IOException(Code)
Handles a new HTTP request.

Note: ClientDisconnectException must be rethrown to the caller. true if the connection should stay open (keepalive)




handleResume
public boolean handleResume() throws IOException(Code)
Handles a comet-style resume. true if the connection should stay open (keepalive)



initStream
public boolean initStream(ReadStream readStream, ReadStream rawRead) throws IOException(Code)
Returns a stream for reading POST data.



isSecure
public boolean isSecure()(Code)
Returns true for a secure connection.



isTop
public boolean isTop()(Code)
Returns true for the top-level request, but false for any include() or forward()



isWaitForRead
final public boolean isWaitForRead()(Code)
Return true if the request waits for a read before beginning.



protocolCloseEvent
public void protocolCloseEvent()(Code)



setHeader
public void setHeader(String key, String value)(Code)
Adds a new header. Used only by the caching to simulate If-Modified-Since.
Parameters:
  key - the key of the new header
Parameters:
  value - the value for the new header



skip
protected void skip() throws IOException(Code)



start
protected void start() throws IOException(Code)
Clear the request variables in preparation for a new request.
Parameters:
  s - the read stream for the request



toString
public String toString()(Code)



Fields inherited from com.caucho.server.connection.AbstractHttpRequest
final public static String CONTEXT_PATH(Code)(Java Doc)
final public static String ERROR_URI(Code)(Java Doc)
final public static String EXCEPTION(Code)(Java Doc)
final public static String EXCEPTION_TYPE(Code)(Java Doc)
final public static String JSP_EXCEPTION(Code)(Java Doc)
final public static String MESSAGE(Code)(Java Doc)
final public static String PATH_INFO(Code)(Java Doc)
final public static String QUERY_STRING(Code)(Java Doc)
final public static String REQUEST_URI(Code)(Java Doc)
final public static String SERVLET_NAME(Code)(Java Doc)
final public static String SERVLET_PATH(Code)(Java Doc)
final public static String SHUTDOWN(Code)(Java Doc)
final public static String STATUS_CODE(Code)(Java Doc)
final protected QDate _calendar(Code)(Java Doc)
final protected CharBuffer _cb(Code)(Java Doc)
final protected Connection _conn(Code)(Java Doc)
protected boolean _expect100Continue(Code)(Java Doc)
protected boolean _hasReadStream(Code)(Java Doc)
final protected static CaseInsensitiveIntMap _headerCodes(Code)(Java Doc)
protected CharSegment _hostHeader(Code)(Java Doc)
protected Invocation _invocation(Code)(Java Doc)
final protected ReadStream _rawRead(Code)(Java Doc)
final protected ReadStream _readStream(Code)(Java Doc)
protected AbstractHttpResponse _response(Code)(Java Doc)
final protected DispatchServer _server(Code)(Java Doc)
protected int _sessionGroup(Code)(Java Doc)
final protected TcpConnection _tcpConn(Code)(Java Doc)
final protected static Logger log(Code)(Java Doc)

Methods inherited from com.caucho.server.connection.AbstractHttpRequest
public void addCloseOnExit(Path path)(Code)(Java Doc)
protected boolean addHeaderInt(char[] keyBuf, int keyOff, int keyLen, CharSegment value)(Code)(Java Doc)
public boolean allowKeepalive()(Code)(Java Doc)
public boolean authenticate() throws ServletException, IOException(Code)(Java Doc)
public void cleanup()(Code)(Java Doc)
protected void connectionClose()(Code)(Java Doc)
protected String dbgId()(Code)(Java Doc)
public String findSessionIdFromConnection()(Code)(Java Doc)
public void finish() throws IOException(Code)(Java Doc)
public Object getAttribute(String name)(Code)(Java Doc)
public Enumeration<String> getAttributeNames()(Code)(Java Doc)
public String getAuthType()(Code)(Java Doc)
public String getCharacterEncoding()(Code)(Java Doc)
final public Connection getConnection()(Code)(Java Doc)
public int getContentLength()(Code)(Java Doc)
public String getContentType()(Code)(Java Doc)
public CharSegment getContentTypeBuffer()(Code)(Java Doc)
public String getContextPath()(Code)(Java Doc)
public Cookie getCookie(String name)(Code)(Java Doc)
public Cookie[] getCookies()(Code)(Java Doc)
public long getDateHeader(String key)(Code)(Java Doc)
final public DispatchServer getDispatchServer()(Code)(Java Doc)
public boolean getHasCookie()(Code)(Java Doc)
abstract public String getHeader(String key)(Code)(Java Doc)
public CharSegment getHeaderBuffer(String name)(Code)(Java Doc)
public void getHeaderBuffers(String name, ArrayList<CharSegment> resultList)(Code)(Java Doc)
public CharSegment getHeaderKey(int index)(Code)(Java Doc)
abstract public Enumeration getHeaderNames()(Code)(Java Doc)
public int getHeaderSize()(Code)(Java Doc)
public CharSegment getHeaderValue(int index)(Code)(Java Doc)
public Enumeration getHeaders(String name)(Code)(Java Doc)
protected CharSequence getHost()(Code)(Java Doc)
public ServletInputStream getInputStream() throws IOException(Code)(Java Doc)
public int getIntHeader(String key)(Code)(Java Doc)
final public Invocation getInvocation()(Code)(Java Doc)
public HttpSession getLoadedSession()(Code)(Java Doc)
public String getLocalAddr()(Code)(Java Doc)
public String getLocalName()(Code)(Java Doc)
public int getLocalPort()(Code)(Java Doc)
public Locale getLocale()(Code)(Java Doc)
public Enumeration<Locale> getLocales()(Code)(Java Doc)
final public byte[] getLogBuffer()(Code)(Java Doc)
public long getLongContentLength()(Code)(Java Doc)
public HttpSession getMemorySession()(Code)(Java Doc)
abstract public String getMethod()(Code)(Java Doc)
public String getPageContextPath()(Code)(Java Doc)
public String getPagePathInfo()(Code)(Java Doc)
public String getPageQueryString()(Code)(Java Doc)
public String getPageServletPath()(Code)(Java Doc)
public String getPageURI()(Code)(Java Doc)
public String getParameter(String name)(Code)(Java Doc)
public Map<String, String[]> getParameterMap()(Code)(Java Doc)
public Enumeration<String> getParameterNames()(Code)(Java Doc)
public String[] getParameterValues(String name)(Code)(Java Doc)
public String getPathInfo()(Code)(Java Doc)
public String getPathTranslated()(Code)(Java Doc)
abstract public String getProtocol()(Code)(Java Doc)
public String getQueryString()(Code)(Java Doc)
public ReadStream getRawInput()(Code)(Java Doc)
public byte[] getRawReadBuffer()(Code)(Java Doc)
public BufferedReader getReader() throws IOException(Code)(Java Doc)
public String getRealPath(String path)(Code)(Java Doc)
public String getRemoteAddr()(Code)(Java Doc)
public String getRemoteHost()(Code)(Java Doc)
public int getRemotePort()(Code)(Java Doc)
public String getRemoteUser(boolean create)(Code)(Java Doc)
public String getRemoteUser()(Code)(Java Doc)
public int getRequestDepth(int depth)(Code)(Java Doc)
public int getRequestDepth()(Code)(Java Doc)
public RequestDispatcher getRequestDispatcher(String path)(Code)(Java Doc)
public String getRequestURI()(Code)(Java Doc)
public StringBuffer getRequestURL()(Code)(Java Doc)
public String getRequestedSessionId()(Code)(Java Doc)
public String getRequestedSessionIdNoVary()(Code)(Java Doc)
public CauchoResponse getResponse()(Code)(Java Doc)
public String getScheme()(Code)(Java Doc)
public String getServerName()(Code)(Java Doc)
public int getServerPort()(Code)(Java Doc)
public String getServletName()(Code)(Java Doc)
public String getServletPath()(Code)(Java Doc)
public HttpSession getSession()(Code)(Java Doc)
public HttpSession getSession(boolean create)(Code)(Java Doc)
final protected String getSessionCookie(SessionManager manager)(Code)(Java Doc)
public int getSessionGroup()(Code)(Java Doc)
final protected SessionManager getSessionManager()(Code)(Java Doc)
final public long getStartTime()(Code)(Java Doc)
public ReadStream getStream() throws IOException(Code)(Java Doc)
public ReadStream getStream(boolean isReader) throws IOException(Code)(Java Doc)
abstract public byte[] getUriBuffer()(Code)(Java Doc)
abstract public int getUriLength()(Code)(Java Doc)
public Principal getUserPrincipal()(Code)(Java Doc)
public String getVaryCookie()(Code)(Java Doc)
public boolean getVaryCookies()(Code)(Java Doc)
final public WebApp getWebApp()(Code)(Java Doc)
public boolean handleResume() throws IOException(Code)(Java Doc)
public void init()(Code)(Java Doc)
abstract protected boolean initStream(ReadStream readStream, ReadStream rawStream) throws IOException(Code)(Java Doc)
public boolean isIgnoreClientDisconnect()(Code)(Java Doc)
protected boolean isKeepalive()(Code)(Java Doc)
public boolean isRequestedSessionIdFromCookie()(Code)(Java Doc)
public boolean isRequestedSessionIdFromURL()(Code)(Java Doc)
public boolean isRequestedSessionIdFromUrl()(Code)(Java Doc)
public boolean isRequestedSessionIdValid()(Code)(Java Doc)
public boolean isSecure()(Code)(Java Doc)
public boolean isTop()(Code)(Java Doc)
public boolean isTransportSecure()(Code)(Java Doc)
public boolean isUserInRole(String role)(Code)(Java Doc)
public void killKeepalive()(Code)(Java Doc)
public void logout()(Code)(Java Doc)
public void logoutUserPrincipal()(Code)(Java Doc)
public int printRemoteAddr(byte[] buffer, int offset) throws IOException(Code)(Java Doc)
public void removeAttribute(String name)(Code)(Java Doc)
protected void restartServer() throws IOException, ServletException(Code)(Java Doc)
protected void resume() throws IOException(Code)(Java Doc)
public String runAs(String role)(Code)(Java Doc)
public void setAttribute(String name, Object value)(Code)(Java Doc)
public void setCharacterEncoding(String encoding) throws UnsupportedEncodingException(Code)(Java Doc)
public void setHasCookie()(Code)(Java Doc)
public void setHeader(String key, String value)(Code)(Java Doc)
final public void setInvocation(Invocation invocation)(Code)(Java Doc)
final protected void setStartTime()(Code)(Java Doc)
public void setVaryCookie(String cookie)(Code)(Java Doc)
protected void skip() throws IOException(Code)(Java Doc)
protected void start() throws IOException(Code)(Java Doc)

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.