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


java.lang.Object
   org.apache.coyote.http11.Http11NioProcessor

Http11NioProcessor
public class Http11NioProcessor implements ActionHook(Code)
Processes HTTP requests.
author:
   Remy Maucherat
author:
   Filip Hanik


Field Summary
protected  Adapteradapter
     Associated adapter.
protected  booleancomet
     Comet used.
protected  booleancometClose
     Closed flag, a Comet async thread can signal for this Nio processor to be closed and recycled instead of waiting for a timeout.
protected  String[]compressableMimeTypes
    
protected  intcompressionLevel
     Allowed compression level.
protected  intcompressionMinSize
     Minimum contentsize to make compression.
protected  booleancontentDelimitation
     Content delimitator for the request (if false, the connection will be closed at the end of the request).
protected  booleandisableUploadTimeout
     Flag to disable setting a different time-out on uploads.
protected  NioEndpointendpoint
     Associated endpoint.
protected  booleanerror
     Error flag.
protected  booleanexpectation
    
protected  char[]hostNameC
     Host name (used to avoid useless B2C conversion on the host name).
protected  booleanhttp09
     HTTP/0.9 flag.
protected  booleanhttp11
     HTTP/1.1 flag.
protected  InternalNioInputBufferinputBuffer
     Input.
protected  booleankeepAlive
     Keep-alive.
protected  StringlocalAddr
     The local Host address.
protected  StringlocalName
     Local Host associated with the current connection.
protected  intlocalPort
    
protected static  org.apache.juli.logging.Loglog
     Logger.
protected  intmaxKeepAliveRequests
     Maximum number of Keep-Alive requests to honor.
protected  intmaxSavePostSize
     Max save post size.
protected  PatternnoCompressionUserAgents
    
protected  InternalNioOutputBufferoutputBuffer
     Output.
protected  StringremoteAddr
     Remote Address associated with the current connection.
protected  StringremoteHost
     Remote Host associated with the current connection.
protected  intremotePort
    
protected  Requestrequest
     Request object.
protected  Responseresponse
     Response object.
protected  Pattern[]restrictedUserAgents
     List of restricted user agents.
protected  NioEndpoint.SendfileDatasendfileData
     Sendfile data.
protected  Stringserver
     Allow a customized the server header for the tin-foil hat folks.
protected static  StringManagersm
     The string manager for this package.
protected  NioChannelsocket
     Socket associated with the current connection.
protected  intsocketBuffer
     Socket buffering.
protected  booleanssl
    
protected  SSLSupportsslSupport
     SSL information.
protected  inttimeout
     Maximum timeout on uploads.

Constructor Summary
public  Http11NioProcessor(int rxBufSize, int txBufSize, int maxHttpHeaderSize, NioEndpoint endpoint)
    

Method Summary
public  voidaction(ActionCode actionCode, Object param)
     Send an action to the connector.
public  voidaddCompressableMimeType(String mimeType)
     Add a mime-type which will be compressable The mime-type String will be exactly matched in the response mime-type header .
protected  voidaddFilter(String className)
     Add input or output filter.
protected  booleanaddInputFilter(InputFilter[] inputFilters, String encodingName)
     Add an input filter to the current request.
public  voidaddNoCompressionUserAgent(String userAgent)
     Add user-agent for which gzip compression didn't works The user agent String given will be exactly matched to the user-agent header submitted by the client.
public  voidaddRestrictedUserAgent(String userAgent)
     Add restricted user-agent (which will downgrade the connector to HTTP/1.0 mode).
public  voidendRequest()
    
public  SocketStateevent(SocketStatus status)
     Process pipelined HTTP requests using the specified input and output streams.
protected  intfindBytes(ByteChunk bc, byte[] b)
     Specialized utility method: find a sequence of lower case bytes inside a ByteChunk.
public  String[]findCompressableMimeTypes()
     Return the list of restricted user agents.
public  String[]findRestrictedUserAgents()
     Return the list of restricted user agents.
public  AdaptergetAdapter()
     Get the associated adapter.
public  StringgetCompression()
     Return compression level.
public  booleangetDisableUploadTimeout()
     Get the flag that controls upload time-outs.
public  intgetMaxKeepAliveRequests()
     Return the number of Keep-Alive requests that we will honor.
public  intgetMaxSavePostSize()
     Return the maximum size of a POST which will be buffered in SSL mode.
public  RequestgetRequest()
     Get the request associated with this processor.
public  StringgetServer()
     Get the server header name.
public  intgetSocketBuffer()
     Get the socket buffer flag.
public  SSLSupportgetSslSupport()
    
public  intgetTimeout()
     Get the upload timeout.
protected  voidinitializeFilters()
     Initialize standard input and output filters.
public  voidparseHost(MessageBytes valueMB)
     Parse host.
protected  voidprepareRequest()
     After reading the request headers, we have to setup the request filters.
protected  voidprepareResponse()
     When committing the response, we have to validate the set of headers, as well as setup the response filters.
public  SocketStateprocess(NioChannel socket)
     Process pipelined HTTP requests using the specified input and output streams.
public  voidrecycle()
    
public  voidsetAdapter(Adapter adapter)
     Set the associated adapter.
public  voidsetCompressableMimeTypes(String[] compressableMimeTypes)
     Set compressable mime-type list (this method is best when used with a large number of connectors, where it would be better to have all of them referenced a single array).
public  voidsetCompressableMimeTypes(String compressableMimeTypes)
    
public  voidsetCompression(String compression)
     Set compression level.
public  voidsetCompressionMinSize(int compressionMinSize)
     Set Minimum size to trigger compression.
public  voidsetDisableUploadTimeout(boolean isDisabled)
     Set the flag to control upload time-outs.
public  voidsetMaxKeepAliveRequests(int mkar)
     Set the maximum number of Keep-Alive requests to honor. This is to safeguard from DoS attacks.
public  voidsetMaxSavePostSize(int msps)
     Set the maximum size of a POST which will be buffered in SSL mode.
public  voidsetNoCompressionUserAgents(Pattern[] noCompressionUserAgents)
     Set no compression user agent list (this method is best when used with a large number of connectors, where it would be better to have all of them referenced a single array).
public  voidsetNoCompressionUserAgents(String noCompressionUserAgents)
     Set no compression user agent list.
public  voidsetRestrictedUserAgents(Pattern[] restrictedUserAgents)
     Set restricted user agent list (this method is best when used with a large number of connectors, where it would be better to have all of them referenced a single array).
public  voidsetRestrictedUserAgents(String restrictedUserAgents)
     Set restricted user agent list (which will downgrade the connector to HTTP/1.0 mode).
public  voidsetServer(String server)
     Set the server header name.
public  voidsetSocketBuffer(int socketBuffer)
     Set the socket buffer flag.
public  voidsetSslSupport(SSLSupport sslSupport)
    
public  voidsetTimeout(int timeouts)
     Set the upload timeout.
protected  booleanstatusDropsConnection(int status)
     Determine if we must drop the connection because of the HTTP status code.

Field Detail
adapter
protected Adapter adapter(Code)
Associated adapter.



comet
protected boolean comet(Code)
Comet used.



cometClose
protected boolean cometClose(Code)
Closed flag, a Comet async thread can signal for this Nio processor to be closed and recycled instead of waiting for a timeout. Closed by HttpServletResponse.getWriter().close()



compressableMimeTypes
protected String[] compressableMimeTypes(Code)
List of MIMES which could be gzipped



compressionLevel
protected int compressionLevel(Code)
Allowed compression level.



compressionMinSize
protected int compressionMinSize(Code)
Minimum contentsize to make compression.



contentDelimitation
protected boolean contentDelimitation(Code)
Content delimitator for the request (if false, the connection will be closed at the end of the request).



disableUploadTimeout
protected boolean disableUploadTimeout(Code)
Flag to disable setting a different time-out on uploads.



endpoint
protected NioEndpoint endpoint(Code)
Associated endpoint.



error
protected boolean error(Code)
Error flag.



expectation
protected boolean expectation(Code)
Is there an expectation ?



hostNameC
protected char[] hostNameC(Code)
Host name (used to avoid useless B2C conversion on the host name).



http09
protected boolean http09(Code)
HTTP/0.9 flag.



http11
protected boolean http11(Code)
HTTP/1.1 flag.



inputBuffer
protected InternalNioInputBuffer inputBuffer(Code)
Input.



keepAlive
protected boolean keepAlive(Code)
Keep-alive.



localAddr
protected String localAddr(Code)
The local Host address.



localName
protected String localName(Code)
Local Host associated with the current connection.



localPort
protected int localPort(Code)
Local port to which the socket is connected



log
protected static org.apache.juli.logging.Log log(Code)
Logger.



maxKeepAliveRequests
protected int maxKeepAliveRequests(Code)
Maximum number of Keep-Alive requests to honor.



maxSavePostSize
protected int maxSavePostSize(Code)
Max save post size.



noCompressionUserAgents
protected Pattern noCompressionUserAgents(Code)
List of user agents to not use gzip with



outputBuffer
protected InternalNioOutputBuffer outputBuffer(Code)
Output.



remoteAddr
protected String remoteAddr(Code)
Remote Address associated with the current connection.



remoteHost
protected String remoteHost(Code)
Remote Host associated with the current connection.



remotePort
protected int remotePort(Code)
Remote port to which the socket is connected



request
protected Request request(Code)
Request object.



response
protected Response response(Code)
Response object.



restrictedUserAgents
protected Pattern[] restrictedUserAgents(Code)
List of restricted user agents.



sendfileData
protected NioEndpoint.SendfileData sendfileData(Code)
Sendfile data.



server
protected String server(Code)
Allow a customized the server header for the tin-foil hat folks.



sm
protected static StringManager sm(Code)
The string manager for this package.



socket
protected NioChannel socket(Code)
Socket associated with the current connection.



socketBuffer
protected int socketBuffer(Code)
Socket buffering.



ssl
protected boolean ssl(Code)
SSL enabled ?



sslSupport
protected SSLSupport sslSupport(Code)
SSL information.



timeout
protected int timeout(Code)
Maximum timeout on uploads. 5 minutes as in Apache HTTPD server.




Constructor Detail
Http11NioProcessor
public Http11NioProcessor(int rxBufSize, int txBufSize, int maxHttpHeaderSize, NioEndpoint endpoint)(Code)




Method Detail
action
public void action(ActionCode actionCode, Object param)(Code)
Send an action to the connector.
Parameters:
  actionCode - Type of the action
Parameters:
  param - Action parameter



addCompressableMimeType
public void addCompressableMimeType(String mimeType)(Code)
Add a mime-type which will be compressable The mime-type String will be exactly matched in the response mime-type header .
Parameters:
  mimeType - mime-type string



addFilter
protected void addFilter(String className)(Code)
Add input or output filter.
Parameters:
  className - class name of the filter



addInputFilter
protected boolean addInputFilter(InputFilter[] inputFilters, String encodingName)(Code)
Add an input filter to the current request. false if the encoding was not found (which would mean it isunsupported)



addNoCompressionUserAgent
public void addNoCompressionUserAgent(String userAgent)(Code)
Add user-agent for which gzip compression didn't works The user agent String given will be exactly matched to the user-agent header submitted by the client.
Parameters:
  userAgent - user-agent string



addRestrictedUserAgent
public void addRestrictedUserAgent(String userAgent)(Code)
Add restricted user-agent (which will downgrade the connector to HTTP/1.0 mode). The user agent String given will be matched via regexp to the user-agent header submitted by the client.
Parameters:
  userAgent - user-agent string



endRequest
public void endRequest()(Code)



event
public SocketState event(SocketStatus status) throws IOException(Code)
Process pipelined HTTP requests using the specified input and output streams.
throws:
  IOException - error during an I/O operation



findBytes
protected int findBytes(ByteChunk bc, byte[] b)(Code)
Specialized utility method: find a sequence of lower case bytes inside a ByteChunk.



findCompressableMimeTypes
public String[] findCompressableMimeTypes()(Code)
Return the list of restricted user agents.



findRestrictedUserAgents
public String[] findRestrictedUserAgents()(Code)
Return the list of restricted user agents.



getAdapter
public Adapter getAdapter()(Code)
Get the associated adapter. the associated adapter



getCompression
public String getCompression()(Code)
Return compression level.



getDisableUploadTimeout
public boolean getDisableUploadTimeout()(Code)
Get the flag that controls upload time-outs.



getMaxKeepAliveRequests
public int getMaxKeepAliveRequests()(Code)
Return the number of Keep-Alive requests that we will honor.



getMaxSavePostSize
public int getMaxSavePostSize()(Code)
Return the maximum size of a POST which will be buffered in SSL mode.



getRequest
public Request getRequest()(Code)
Get the request associated with this processor. The request



getServer
public String getServer()(Code)
Get the server header name.



getSocketBuffer
public int getSocketBuffer()(Code)
Get the socket buffer flag.



getSslSupport
public SSLSupport getSslSupport()(Code)



getTimeout
public int getTimeout()(Code)
Get the upload timeout.



initializeFilters
protected void initializeFilters()(Code)
Initialize standard input and output filters.



parseHost
public void parseHost(MessageBytes valueMB)(Code)
Parse host.



prepareRequest
protected void prepareRequest()(Code)
After reading the request headers, we have to setup the request filters.



prepareResponse
protected void prepareResponse() throws IOException(Code)
When committing the response, we have to validate the set of headers, as well as setup the response filters.



process
public SocketState process(NioChannel socket) throws IOException(Code)
Process pipelined HTTP requests using the specified input and output streams.
throws:
  IOException - error during an I/O operation



recycle
public void recycle()(Code)



setAdapter
public void setAdapter(Adapter adapter)(Code)
Set the associated adapter.
Parameters:
  adapter - the new adapter



setCompressableMimeTypes
public void setCompressableMimeTypes(String[] compressableMimeTypes)(Code)
Set compressable mime-type list (this method is best when used with a large number of connectors, where it would be better to have all of them referenced a single array).



setCompressableMimeTypes
public void setCompressableMimeTypes(String compressableMimeTypes)(Code)
Set compressable mime-type list List contains users agents separated by ',' : ie: "text/html,text/xml,text/plain"



setCompression
public void setCompression(String compression)(Code)
Set compression level.



setCompressionMinSize
public void setCompressionMinSize(int compressionMinSize)(Code)
Set Minimum size to trigger compression.



setDisableUploadTimeout
public void setDisableUploadTimeout(boolean isDisabled)(Code)
Set the flag to control upload time-outs.



setMaxKeepAliveRequests
public void setMaxKeepAliveRequests(int mkar)(Code)
Set the maximum number of Keep-Alive requests to honor. This is to safeguard from DoS attacks. Setting to a negative value disables the check.



setMaxSavePostSize
public void setMaxSavePostSize(int msps)(Code)
Set the maximum size of a POST which will be buffered in SSL mode.



setNoCompressionUserAgents
public void setNoCompressionUserAgents(Pattern[] noCompressionUserAgents)(Code)
Set no compression user agent list (this method is best when used with a large number of connectors, where it would be better to have all of them referenced a single array).



setNoCompressionUserAgents
public void setNoCompressionUserAgents(String noCompressionUserAgents)(Code)
Set no compression user agent list. List contains users agents separated by ',' : ie: "gorilla,desesplorer,tigrus"



setRestrictedUserAgents
public void setRestrictedUserAgents(Pattern[] restrictedUserAgents)(Code)
Set restricted user agent list (this method is best when used with a large number of connectors, where it would be better to have all of them referenced a single array).



setRestrictedUserAgents
public void setRestrictedUserAgents(String restrictedUserAgents)(Code)
Set restricted user agent list (which will downgrade the connector to HTTP/1.0 mode). List contains users agents separated by ',' : ie: "gorilla,desesplorer,tigrus"



setServer
public void setServer(String server)(Code)
Set the server header name.



setSocketBuffer
public void setSocketBuffer(int socketBuffer)(Code)
Set the socket buffer flag.



setSslSupport
public void setSslSupport(SSLSupport sslSupport)(Code)



setTimeout
public void setTimeout(int timeouts)(Code)
Set the upload timeout.



statusDropsConnection
protected boolean statusDropsConnection(int status)(Code)
Determine if we must drop the connection because of the HTTP status code. Use the same list of codes as Apache/httpd.



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.