Java Doc for HTTPHandler.java in  » Web-Server » JicarillaHTTP » org » jicarilla » 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 » Web Server » JicarillaHTTP » org.jicarilla.http 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.jicarilla.http.HTTPHandler

All known Subclasses:   org.jicarilla.http.HTTPMessageGenerator,
HTTPHandler
public interface HTTPHandler (Code)
The handler gets notified whenever the parser finds a new element of a message. Handlers do *not* need to be threadsafe.
author:
   Leo Simons
version:
   $Id: HTTPHandler.java,v 1.5 2004/04/03 10:13:23 lsimons Exp $




Method Summary
 voidendMessage()
     This method will be called by the parser to signal that the current message has ended.
 voidfoundBody(ByteBuffer buffer)
     This method will be called zero or more times, after the request or response line and the headers have been parsed.
 voidfoundHeaderName(ByteBuffer header)
     This method will be called zero or more times, once for each header name, after the start line has been parsed.
 voidfoundHeaderValue(ByteBuffer value)
     This method will be called zero or more times, once for each header value, after the start line has been parsed.
 voidfoundStartLineFirstField(ByteBuffer firstField)
     This will be the second method called.
 voidfoundStartLineSecondField(ByteBuffer secondField)
     This will be the third method called.
 voidfoundStartLineThirdField(ByteBuffer thirdField)
     this will be the fourth method called.
 voidfoundTrailerName(ByteBuffer trailer)
     This method will be called one or more times, once for each trailer name, after the body has been parsed, if and only if HTTPHandler.hasTrailers() returned true.
 voidfoundTrailerValue(ByteBuffer value)
     This method will be called one or more times, once for each footer value, after the body has been parsed, if and only if HTTPHandler.hasTrailers() returned true.
 intgetBodySize()
     This method will be caleld once by the parser to determine the size of the expected body, if and only if the call to HTTPHandler.getBodyType() returned HTTPParser.BODY_TYPE_NORMAL .
 intgetBodyType()
     This method will be called once by the parser, after all the headers have been found.
 String[]getTrailerNames()
     This method will be called once by the parser directly after HTTPHandler.hasTrailers() if and only if that method returned true. a non-empty array of non-null strings representingthe trailers that will be present.
 booleanhasTrailers()
     This method will be called by the parser if HTTPHandler.getBodyType() returns HTTPParser.BODY_TYPE_CHUNKING to determine whether any trailers will be present.
 voidnewMessage()
     This method will be called by the parser to signal that it will start providing the data of a new message that is being received.



Method Detail
endMessage
void endMessage()(Code)
This method will be called by the parser to signal that the current message has ended. It will always be called exactly once.



foundBody
void foundBody(ByteBuffer buffer)(Code)
This method will be called zero or more times, after the request or response line and the headers have been parsed. It will always follow after a call to foundHeaderValue().
Parameters:
  buffer - part of the body of the message. Notethat decoding of any Chunked transfer codings willhave been done already.



foundHeaderName
void foundHeaderName(ByteBuffer header)(Code)
This method will be called zero or more times, once for each header name, after the start line has been parsed. It will be followed by a call to the foundHeaderValue() method.
Parameters:
  header - the name of the header that was found



foundHeaderValue
void foundHeaderValue(ByteBuffer value)(Code)
This method will be called zero or more times, once for each header value, after the start line has been parsed. It will always follow immediately after the foundHeaderName() has been called.
Parameters:
  value - the value of the header that was found



foundStartLineFirstField
void foundStartLineFirstField(ByteBuffer firstField)(Code)
This will be the second method called. In the case of a request, this field will container the request method. In the case of a response, this will be the HTTP version.
Parameters:
  firstField - the value of the first field



foundStartLineSecondField
void foundStartLineSecondField(ByteBuffer secondField)(Code)
This will be the third method called. In the case of a request, this field will contain the request URI. In the case of a response, this field will contain the status code.
Parameters:
  secondField - the value of the second field



foundStartLineThirdField
void foundStartLineThirdField(ByteBuffer thirdField)(Code)
this will be the fourth method called. In the case of a request, this field will contain the version. In the case of a response, this field will contain the reason phrase.
Parameters:
  thirdField - the value of the third field



foundTrailerName
void foundTrailerName(ByteBuffer trailer)(Code)
This method will be called one or more times, once for each trailer name, after the body has been parsed, if and only if HTTPHandler.hasTrailers() returned true. It will be followed by a call to the foundTrailerValue() method. Only trailer names that have been returned from the parser's call to HTTPHandler.getTrailerNames() will be provided.
Parameters:
  trailer - the name of the trailer that was found.



foundTrailerValue
void foundTrailerValue(ByteBuffer value)(Code)
This method will be called one or more times, once for each footer value, after the body has been parsed, if and only if HTTPHandler.hasTrailers() returned true. It will always follow immediately after the foundTrailerName() has been called.
Parameters:
  value - the value of the trailer that was found.



getBodySize
int getBodySize()(Code)
This method will be caleld once by the parser to determine the size of the expected body, if and only if the call to HTTPHandler.getBodyType() returned HTTPParser.BODY_TYPE_NORMAL . an integer indicating the expected size of the body,in bytes.



getBodyType
int getBodyType()(Code)
This method will be called once by the parser, after all the headers have been found. If the return value is HTTPParser.BODY_TYPE_NONE , it will be followed by a call to HTTPHandler.endMessage() . If the return value is HTTPParser.BODY_TYPE_NORMAL , it will be followed by a call to HTTPHandler.getBodySize() . If the return value is HTTPParser.BODY_TYPE_CHUNKING , it will be followed by one or more calls to HTTPHandler.foundBody(ByteBuffer) . an integer representing the body type that theparser should attempt to retrieve. Valid values areHTTPParser.BODY_TYPE_NONE,HTTPParser.BODY_TYPE_NORMAL andHTTPParser.BODY_TYPE_CHUNKING.



getTrailerNames
String[] getTrailerNames()(Code)
This method will be called once by the parser directly after HTTPHandler.hasTrailers() if and only if that method returned true. a non-empty array of non-null strings representingthe trailers that will be present.



hasTrailers
boolean hasTrailers()(Code)
This method will be called by the parser if HTTPHandler.getBodyType() returns HTTPParser.BODY_TYPE_CHUNKING to determine whether any trailers will be present. It will be followed by a call to the getTrailerNames() method if and only if this method returns true. It will be followed by a call to the endMessage() method if and only if this method returns false. true if there are trailers present, false otherwise.



newMessage
void newMessage()(Code)
This method will be called by the parser to signal that it will start providing the data of a new message that is being received.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.