Java Doc for AbstractGenerator.java in  » Sevlet-Container » jetty-modules » org » mortbay » jetty » 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 » jetty modules » org.mortbay.jetty 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.mortbay.jetty.AbstractGenerator

All known Subclasses:   org.mortbay.jetty.HttpGenerator,
AbstractGenerator
abstract public class AbstractGenerator implements Generator(Code)
Abstract Generator. Builds HTTP Messages. Currently this class uses a system parameter "jetty.direct.writers" to control two optional writer to byte conversions. buffer.writers=true will probably be faster, but will consume more memory. This option is just for testing and tuning.
author:
   gregw

Inner Class :public static class Output extends ServletOutputStream
Inner Class :public static class OutputWriter extends Writer

Field Summary
final public static  intSTATE_CONTENT
    
final public static  intSTATE_END
    
final public static  intSTATE_FLUSHING
    
final public static  intSTATE_HEADER
    
protected  Buffer_buffer
    
protected  Buffers_buffers
    
protected  boolean_close
    
protected  Buffer_content
    
protected  int_contentBufferSize
    
protected  long_contentLength
    
protected  long_contentWritten
    
protected  EndPoint_endp
    
protected  boolean_head
    
protected  Buffer_header
    
protected  int_headerBufferSize
    
protected  boolean_last
    
protected  Buffer_method
    
protected  boolean_noContent
    
protected  Buffer_reason
    
protected  int_state
    
protected  int_status
    
protected  String_uri
    
protected  int_version
    

Constructor Summary
public  AbstractGenerator(Buffers buffers, EndPoint io, int headerBufferSize, int contentBufferSize)
     Constructor.

Method Summary
public  voidcomplete()
     Complete the message.
abstract public  voidcompleteHeader(HttpFields fields, boolean allContentAdded)
    
 voidcompleteUncheckedAddContent()
    
abstract public  longflush()
    
public  intgetContentBufferSize()
    
public  longgetContentWritten()
    
public static  StringgetReason(int code)
    
protected static  BuffergetReasonBuffer(int code)
    
public  booleangetSendServerVersion()
    
public  intgetState()
    
public  BuffergetUncheckedBuffer()
    
public  intgetVersion()
    
public  voidincreaseContentBufferSize(int contentBufferSize)
    
public  booleanisBufferFull()
    
public  booleanisCommitted()
    
public  booleanisComplete()
    
public  booleanisContentWritten()
    
public  booleanisHead()
    
public  booleanisIdle()
    
public  booleanisPersistent()
    
public  booleanisState(int state)
    
abstract protected  intprepareUncheckedAddContent()
     Prepare buffer for unchecked writes.
public  voidreset(boolean returnBuffers)
    
public  voidresetBuffer()
    
public  voidsendError(int code, String reason, String content, boolean close)
     Utility method to send an error response.
public  voidsetContentLength(long value)
    
public  voidsetHead(boolean head)
    
public  voidsetPersistent(boolean persistent)
    
public  voidsetRequest(String method, String uri)
    
public  voidsetResponse(int status, String reason)
    
public  voidsetSendServerVersion(boolean sendServerVersion)
    
public  voidsetVersion(int version)
    
Parameters:
  version - The version of the client the response is being sent to (NB.
 voiduncheckedAddContent(int b)
    

Field Detail
STATE_CONTENT
final public static int STATE_CONTENT(Code)



STATE_END
final public static int STATE_END(Code)



STATE_FLUSHING
final public static int STATE_FLUSHING(Code)



STATE_HEADER
final public static int STATE_HEADER(Code)



_buffer
protected Buffer _buffer(Code)



_buffers
protected Buffers _buffers(Code)



_close
protected boolean _close(Code)



_content
protected Buffer _content(Code)



_contentBufferSize
protected int _contentBufferSize(Code)



_contentLength
protected long _contentLength(Code)



_contentWritten
protected long _contentWritten(Code)



_endp
protected EndPoint _endp(Code)



_head
protected boolean _head(Code)



_header
protected Buffer _header(Code)



_headerBufferSize
protected int _headerBufferSize(Code)



_last
protected boolean _last(Code)



_method
protected Buffer _method(Code)



_noContent
protected boolean _noContent(Code)



_reason
protected Buffer _reason(Code)



_state
protected int _state(Code)



_status
protected int _status(Code)



_uri
protected String _uri(Code)



_version
protected int _version(Code)




Constructor Detail
AbstractGenerator
public AbstractGenerator(Buffers buffers, EndPoint io, int headerBufferSize, int contentBufferSize)(Code)
Constructor.
Parameters:
  buffers - buffer pool
Parameters:
  headerBufferSize - Size of the buffer to allocate for HTTP header
Parameters:
  contentBufferSize - Size of the buffer to allocate for HTTP content




Method Detail
complete
public void complete() throws IOException(Code)
Complete the message.
throws:
  IOException -



completeHeader
abstract public void completeHeader(HttpFields fields, boolean allContentAdded) throws IOException(Code)



completeUncheckedAddContent
void completeUncheckedAddContent()(Code)



flush
abstract public long flush() throws IOException(Code)



getContentBufferSize
public int getContentBufferSize()(Code)
Returns the contentBufferSize.



getContentWritten
public long getContentWritten()(Code)
Returns the contentWritten.



getReason
public static String getReason(int code)(Code)



getReasonBuffer
protected static Buffer getReasonBuffer(int code)(Code)



getSendServerVersion
public boolean getSendServerVersion()(Code)



getState
public int getState()(Code)



getUncheckedBuffer
public Buffer getUncheckedBuffer()(Code)



getVersion
public int getVersion()(Code)



increaseContentBufferSize
public void increaseContentBufferSize(int contentBufferSize)(Code)

Parameters:
  contentBufferSize - The contentBufferSize to set.



isBufferFull
public boolean isBufferFull()(Code)



isCommitted
public boolean isCommitted()(Code)



isComplete
public boolean isComplete()(Code)



isContentWritten
public boolean isContentWritten()(Code)



isHead
public boolean isHead()(Code)
Returns the head.



isIdle
public boolean isIdle()(Code)



isPersistent
public boolean isPersistent()(Code)
false if the connection should be closed after a request has been read,true if it should be used for additional requests.



isState
public boolean isState(int state)(Code)



prepareUncheckedAddContent
abstract protected int prepareUncheckedAddContent() throws IOException(Code)
Prepare buffer for unchecked writes. Prepare the generator buffer to receive unchecked writes the available space in the buffer.
throws:
  IOException -



reset
public void reset(boolean returnBuffers)(Code)



resetBuffer
public void resetBuffer()(Code)



sendError
public void sendError(int code, String reason, String content, boolean close) throws IOException(Code)
Utility method to send an error response. If the builder is not committed, this call is equivalent to a setResponse, addcontent and complete call.
Parameters:
  code -
Parameters:
  reason -
Parameters:
  content -
Parameters:
  close -
throws:
  IOException -



setContentLength
public void setContentLength(long value)(Code)



setHead
public void setHead(boolean head)(Code)

Parameters:
  head - The head to set.



setPersistent
public void setPersistent(boolean persistent)(Code)



setRequest
public void setRequest(String method, String uri)(Code)



setResponse
public void setResponse(int status, String reason)(Code)

Parameters:
  status - The status code to send.
Parameters:
  reason - the status message to send.



setSendServerVersion
public void setSendServerVersion(boolean sendServerVersion)(Code)



setVersion
public void setVersion(int version)(Code)

Parameters:
  version - The version of the client the response is being sent to (NB. Not the versionin the response, which is the version of the server).



uncheckedAddContent
void uncheckedAddContent(int b)(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.