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


java.lang.Object
   org.apache.coyote.ajp.AjpProcessor

AjpProcessor
public class AjpProcessor implements ActionHook(Code)
Processes HTTP requests.
author:
   Remy Maucherat
author:
   Henri Gomez
author:
   Dan Milstein
author:
   Keith Wannamaker
author:
   Kevin Seguin
author:
   Costin Manolache
author:
   Bill Barker

Inner Class :protected class SocketInputBuffer implements InputBuffer
Inner Class :protected class SocketOutputBuffer implements OutputBuffer

Field Summary
protected  Adapteradapter
     Associated adapter.
protected  MessageBytesbodyBytes
     Body message.
protected  AjpMessagebodyMessage
     Body message.
protected  MessageBytescertificates
     Byte chunk for certs.
protected  booleanempty
     Body empty flag.
final protected static  byte[]endMessageArray
     End message array.
protected  booleanendOfStream
     End of stream flag.
protected  JIoEndpointendpoint
     Associated endpoint.
protected  booleanerror
     Error flag.
protected  booleanfinished
     Finished response.
protected  booleanfirst
     First read.
final protected static  byte[]flushMessageArray
     Flush message array.
final protected static  byte[]getBodyMessageArray
     Direct buffer used for sending right away a get body message.
protected  char[]hostNameC
     Host name (used to avoid useless B2C conversion on the host name).
protected  InputStreaminput
     Input stream.
protected  intkeepAliveTimeout
     The number of milliseconds Tomcat will wait for a subsequent request before closing the connection.
protected static  org.apache.juli.logging.Loglog
     Logger.
protected  OutputStreamoutput
     Output stream.
final protected static  byte[]pongMessageArray
     Direct buffer used for sending right away a pong message.
protected  longreadTimeout
     The socket timeout used when reading the first block of the request header.
protected  booleanreplay
     Replay read.
protected  Requestrequest
     Request object.
protected  AjpMessagerequestHeaderMessage
     Header message.
protected  StringrequiredSecret
     Required secret.
protected  Responseresponse
     Response object.
protected  AjpMessageresponseHeaderMessage
     Message used for response header composition.
protected static  StringManagersm
     The string manager for this package.
protected  Socketsocket
     Socket associated with the current connection.
protected  booleanstarted
     State flag.
protected  MessageBytestmpMB
     Temp message bytes used for processing.
protected  booleantomcatAuthentication
    

Constructor Summary
public  AjpProcessor(int packetSize, JIoEndpoint endpoint)
    

Method Summary
public  voidaction(ActionCode actionCode, Object param)
     Send an action to the connector.
protected  voidfinish()
     Finish AJP response.
protected  voidflush()
     Callback to write data from the buffer.
public  AdaptergetAdapter()
     Get the associated adapter.
public  intgetKeepAliveTimeout()
    
public  RequestgetRequest()
     Get the request associated with this processor.
public  booleangetTomcatAuthentication()
    
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  booleanprocess(Socket socket)
     Process pipelined HTTP requests using the specified input and output streams.
protected  booleanread(byte[] buf, int pos, int n)
     Read at least the specified amount of bytes, and place them in the input buffer.
protected  booleanreadMessage(AjpMessage message)
     Read an AJP message.
public  booleanreceive()
     Receive a chunk of data.
public  voidrecycle()
     Recycle the processor.
public  voidsetAdapter(Adapter adapter)
     Set the associated adapter.
public  voidsetKeepAliveTimeout(int timeout)
    
public  voidsetRequiredSecret(String requiredSecret)
    
public  voidsetTomcatAuthentication(boolean tomcatAuthentication)
    

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



bodyBytes
protected MessageBytes bodyBytes(Code)
Body message.



bodyMessage
protected AjpMessage bodyMessage(Code)
Body message.



certificates
protected MessageBytes certificates(Code)
Byte chunk for certs.



empty
protected boolean empty(Code)
Body empty flag.



endMessageArray
final protected static byte[] endMessageArray(Code)
End message array.



endOfStream
protected boolean endOfStream(Code)
End of stream flag.



endpoint
protected JIoEndpoint endpoint(Code)
Associated endpoint.



error
protected boolean error(Code)
Error flag.



finished
protected boolean finished(Code)
Finished response.



first
protected boolean first(Code)
First read.



flushMessageArray
final protected static byte[] flushMessageArray(Code)
Flush message array.



getBodyMessageArray
final protected static byte[] getBodyMessageArray(Code)
Direct buffer used for sending right away a get body message.



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



input
protected InputStream input(Code)
Input stream.



keepAliveTimeout
protected int keepAliveTimeout(Code)
The number of milliseconds Tomcat will wait for a subsequent request before closing the connection. The default is the same as for Apache HTTP Server (15 000 milliseconds).



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



output
protected OutputStream output(Code)
Output stream.



pongMessageArray
final protected static byte[] pongMessageArray(Code)
Direct buffer used for sending right away a pong message.



readTimeout
protected long readTimeout(Code)
The socket timeout used when reading the first block of the request header.



replay
protected boolean replay(Code)
Replay read.



request
protected Request request(Code)
Request object.



requestHeaderMessage
protected AjpMessage requestHeaderMessage(Code)
Header message. Note that this header is merely the one used during the processing of the first message of a "request", so it might not be a request header. It will stay unchanged during the processing of the whole request.



requiredSecret
protected String requiredSecret(Code)
Required secret.



response
protected Response response(Code)
Response object.



responseHeaderMessage
protected AjpMessage responseHeaderMessage(Code)
Message used for response header composition.



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



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



started
protected boolean started(Code)
State flag.



tmpMB
protected MessageBytes tmpMB(Code)
Temp message bytes used for processing.



tomcatAuthentication
protected boolean tomcatAuthentication(Code)
Use Tomcat authentication ?




Constructor Detail
AjpProcessor
public AjpProcessor(int packetSize, JIoEndpoint 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



finish
protected void finish() throws IOException(Code)
Finish AJP response.



flush
protected void flush() throws IOException(Code)
Callback to write data from the buffer.



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



getKeepAliveTimeout
public int getKeepAliveTimeout()(Code)



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



getTomcatAuthentication
public boolean getTomcatAuthentication()(Code)



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 boolean process(Socket socket) throws IOException(Code)
Process pipelined HTTP requests using the specified input and output streams.
throws:
  IOException - error during an I/O operation



read
protected boolean read(byte[] buf, int pos, int n) throws IOException(Code)
Read at least the specified amount of bytes, and place them in the input buffer.



readMessage
protected boolean readMessage(AjpMessage message) throws IOException(Code)
Read an AJP message. true if the message has been read, false if the short readdidn't return anything
throws:
  IOException - any other failure, including incomplete reads



receive
public boolean receive() throws IOException(Code)
Receive a chunk of data. Called to implement the 'special' packet in ajp13 and to receive the data after we send a GET_BODY packet



recycle
public void recycle()(Code)
Recycle the processor.



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



setKeepAliveTimeout
public void setKeepAliveTimeout(int timeout)(Code)



setRequiredSecret
public void setRequiredSecret(String requiredSecret)(Code)



setTomcatAuthentication
public void setTomcatAuthentication(boolean tomcatAuthentication)(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.