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


java.lang.Object
   org.apache.ajp.Ajp13

Ajp13
public class Ajp13 (Code)
Represents a single, persistent connection between the web server and the servlet container. Uses the Apache JServ Protocol version 1.3 for communication. Because this protocal does not multiplex requests, this connection can only be associated with a single request-handling cycle at a time.

This class contains knowledge about how an individual packet is laid out (via the Ajp13Packet class), and also about the stages of communicaton between the server and the servlet container. It translates from Tomcat's internal servlet support methods (e.g. doWrite) to the correct packets to send to the web server.
See Also:   Ajp13Interceptor
See Also:   
author:
   Dan Milstein [danmil@shore.net]
author:
   Keith Wannamaker [Keith@Wannamaker.org]
author:
   Kevin Seguin [seguin@apache.org]
author:
   Henri Gomez [hgomez@apache.org]
author:
   Costin Manolache



Field Summary
final public static  intH_SIZE
    
final public static  intJK_AJP13_BAD_BODY
    
final public static  intJK_AJP13_BAD_HEADER
    
final public static  intJK_AJP13_COMM_BROKEN
    
final public static  intJK_AJP13_COMM_CLOSED
    
final public static  intJK_AJP13_INCOMPLETE_BODY
    
final public static  intJK_AJP13_NO_HEADER
    
final static  intMAX_HANDLERS
    
final public static  intMAX_PACKET_SIZE
    
final public static  intMAX_READ_SIZE
    
final public static  intMAX_SEND_SIZE
    
final static  intRESERVED
    
 booleanbackwardCompat
    
 intblen
    
 byte[]bodyBuff
    
 intcurrentId
    
protected  intdebug
    
 booleanend_of_stream
    
 Ajp13PackethBuf
    
 StringhandlerName
    
 AjpHandlerhandlers
    
 InputStreamin
    
 Ajp13PacketinBuf
    
 booleanlogged
    
 Loggerlogger
     XXX place holder...
 OutputStreamout
    
public  Ajp13PacketoutBuf
    
 intpos
    
public  RequestHandlerreqHandler
    
 Stringsecret
    

Constructor Summary
public  Ajp13()
    
public  Ajp13(RequestHandler reqHandler)
    

Method Summary
public  intavailable()
    
public  voidbeginSendHeaders(int status, String statusMessage, int numHeaders)
    
public  voidclose()
     Close the socket connection to the web server.
public  intdoRead()
    
public  intdoRead(byte[] b, int off, int len)
    
public  voiddoWrite(byte b, int off, int len)
    
public  voidendSendHeaders()
    
public  voidfinish()
    
public  StringgetSecret()
    
public  inthandleMessage(int type, Ajp13Packet hBuf, BaseRequest req)
    
public  voidinitBuf()
    
public  booleanisLogged()
    
public  intreceive(Ajp13Packet msg)
     Read in a packet from the web server and store it in the passed-in Ajp13Packet object.
Parameters:
  msg - The object into which to store the incoming packet -- anycurrent contents will be overwritten.
public  intreceiveNextRequest(BaseRequest req)
     Read a new packet from the web server and decode it.
public  voidrecycle()
    
public  intregisterMessageType(int id, String name, AjpHandler h, String sig)
    
public  voidsend(Ajp13Packet msg)
     Send a packet to the web server.
public  voidsendHeader(String name, String value)
    
public  voidsendHeaders(int status, MimeHeaders headers)
    
public  voidsendHeaders(int status, String statusMessage, MimeHeaders headers)
    
public  voidsetBackward(boolean b)
    
public  voidsetDebug(int debug)
    
 voidsetLogged(boolean b)
    
public  voidsetLogger(Logger l)
    
public  voidsetSecret(String s)
    
public  voidsetSocket(Socket socket)
     Associate an open socket with this instance.

Field Detail
H_SIZE
final public static int H_SIZE(Code)



JK_AJP13_BAD_BODY
final public static int JK_AJP13_BAD_BODY(Code)



JK_AJP13_BAD_HEADER
final public static int JK_AJP13_BAD_HEADER(Code)



JK_AJP13_COMM_BROKEN
final public static int JK_AJP13_COMM_BROKEN(Code)



JK_AJP13_COMM_CLOSED
final public static int JK_AJP13_COMM_CLOSED(Code)



JK_AJP13_INCOMPLETE_BODY
final public static int JK_AJP13_INCOMPLETE_BODY(Code)



JK_AJP13_NO_HEADER
final public static int JK_AJP13_NO_HEADER(Code)



MAX_HANDLERS
final static int MAX_HANDLERS(Code)



MAX_PACKET_SIZE
final public static int MAX_PACKET_SIZE(Code)



MAX_READ_SIZE
final public static int MAX_READ_SIZE(Code)



MAX_SEND_SIZE
final public static int MAX_SEND_SIZE(Code)



RESERVED
final static int RESERVED(Code)



backwardCompat
boolean backwardCompat(Code)



blen
int blen(Code)



bodyBuff
byte[] bodyBuff(Code)



currentId
int currentId(Code)



debug
protected int debug(Code)



end_of_stream
boolean end_of_stream(Code)



hBuf
Ajp13Packet hBuf(Code)



handlerName
String handlerName(Code)



handlers
AjpHandler handlers(Code)



in
InputStream in(Code)



inBuf
Ajp13Packet inBuf(Code)



logged
boolean logged(Code)



logger
Logger logger(Code)
XXX place holder...



out
OutputStream out(Code)



outBuf
public Ajp13Packet outBuf(Code)



pos
int pos(Code)



reqHandler
public RequestHandler reqHandler(Code)



secret
String secret(Code)




Constructor Detail
Ajp13
public Ajp13()(Code)



Ajp13
public Ajp13(RequestHandler reqHandler)(Code)




Method Detail
available
public int available() throws IOException(Code)



beginSendHeaders
public void beginSendHeaders(int status, String statusMessage, int numHeaders) throws IOException(Code)



close
public void close() throws IOException(Code)
Close the socket connection to the web server. In general, sockets are maintained across many requests, so this will not be called after finish().
See Also:   Ajp13Interceptor.processConnection



doRead
public int doRead() throws IOException(Code)



doRead
public int doRead(byte[] b, int off, int len) throws IOException(Code)



doWrite
public void doWrite(byte b, int off, int len) throws IOException(Code)



endSendHeaders
public void endSendHeaders() throws IOException(Code)



finish
public void finish() throws IOException(Code)



getSecret
public String getSecret()(Code)



handleMessage
public int handleMessage(int type, Ajp13Packet hBuf, BaseRequest req) throws IOException(Code)
Override for ajp14, temporary



initBuf
public void initBuf()(Code)
Will be overriden



isLogged
public boolean isLogged()(Code)



receive
public int receive(Ajp13Packet msg) throws IOException(Code)
Read in a packet from the web server and store it in the passed-in Ajp13Packet object.
Parameters:
  msg - The object into which to store the incoming packet -- anycurrent contents will be overwritten. The number of bytes read on a successful read or -1 if there was an error.



receiveNextRequest
public int receiveNextRequest(BaseRequest req) throws IOException(Code)
Read a new packet from the web server and decode it. If it's a forwarded request, store its properties in the passed-in AjpRequest object.
Parameters:
  req - An empty (newly-recycled) request object. 200 in case of a successful read of a forwarded request, 500if there were errors in the reading of the request, and -2 if theserver is asking the container to shut itself down.



recycle
public void recycle()(Code)



registerMessageType
public int registerMessageType(int id, String name, AjpHandler h, String sig)(Code)



send
public void send(Ajp13Packet msg) throws IOException(Code)
Send a packet to the web server. Works for any type of message.
Parameters:
  msg - A packet with accumulated data to send to the server --this method will write out the length in the header.



sendHeader
public void sendHeader(String name, String value) throws IOException(Code)



sendHeaders
public void sendHeaders(int status, MimeHeaders headers) throws IOException(Code)



sendHeaders
public void sendHeaders(int status, String statusMessage, MimeHeaders headers) throws IOException(Code)



setBackward
public void setBackward(boolean b)(Code)
Backward compat mode, no login needed



setDebug
public void setDebug(int debug)(Code)



setLogged
void setLogged(boolean b)(Code)



setLogger
public void setLogger(Logger l)(Code)



setSecret
public void setSecret(String s)(Code)



setSocket
public void setSocket(Socket socket) throws IOException(Code)
Associate an open socket with this instance.



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.