org.apache.myfaces.renderkit.html
Class EarlyFlushHtmlResponseWriterImpl

java.lang.Object
  extended by java.io.Writer
      extended by javax.faces.context.ResponseWriter
          extended by org.apache.myfaces.shared.renderkit.html.HtmlResponseWriterImpl
              extended by org.apache.myfaces.renderkit.html.EarlyFlushHtmlResponseWriterImpl
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class EarlyFlushHtmlResponseWriterImpl
extends HtmlResponseWriterImpl

This implementation is just the default html response writer with the early flush logic. The idea is detect when the end "head" element is rendered and in that moment, when the flush call is done, force the flush of the current underlying writer.

Author:
Leonardo Uribe

Field Summary
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
EarlyFlushHtmlResponseWriterImpl(Writer writer, String contentType, String characterEncoding)
           
EarlyFlushHtmlResponseWriterImpl(Writer writer, String contentType, String characterEncoding, boolean wrapScriptContentWithXmlCommentTag)
           
EarlyFlushHtmlResponseWriterImpl(Writer writer, String contentType, String characterEncoding, boolean wrapScriptContentWithXmlCommentTag, String writerContentTypeMode)
           
 
Method Summary
 ResponseWriter cloneWithWriter(Writer writer)
           
 void endElement(String name)
           
 void flush()
           
 void startElement(String name, UIComponent uiComponent)
           
 
Methods inherited from class org.apache.myfaces.shared.renderkit.html.HtmlResponseWriterImpl
close, endCDATA, endDocument, forceFlush, getCharacterEncoding, getContentType, getFacesContext, getInternalBuffer, getInternalBuffer, getWrapScriptContentWithXmlCommentTag, getWriterContentTypeMode, startCDATA, startDocument, supportsContentType, write, write, write, write, write, writeAttribute, writeComment, writeText, writeText, writeText, writeURIAttribute
 
Methods inherited from class javax.faces.context.ResponseWriter
writeDoctype, writePreamble
 
Methods inherited from class java.io.Writer
append, append, append
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EarlyFlushHtmlResponseWriterImpl

public EarlyFlushHtmlResponseWriterImpl(Writer writer,
                                        String contentType,
                                        String characterEncoding)

EarlyFlushHtmlResponseWriterImpl

public EarlyFlushHtmlResponseWriterImpl(Writer writer,
                                        String contentType,
                                        String characterEncoding,
                                        boolean wrapScriptContentWithXmlCommentTag)

EarlyFlushHtmlResponseWriterImpl

public EarlyFlushHtmlResponseWriterImpl(Writer writer,
                                        String contentType,
                                        String characterEncoding,
                                        boolean wrapScriptContentWithXmlCommentTag,
                                        String writerContentTypeMode)
                                 throws FacesException
Throws:
FacesException
Method Detail

cloneWithWriter

public ResponseWriter cloneWithWriter(Writer writer)
Overrides:
cloneWithWriter in class HtmlResponseWriterImpl

startElement

public void startElement(String name,
                         UIComponent uiComponent)
                  throws IOException
Overrides:
startElement in class HtmlResponseWriterImpl
Throws:
IOException

endElement

public void endElement(String name)
                throws IOException
Overrides:
endElement in class HtmlResponseWriterImpl
Throws:
IOException

flush

public void flush()
           throws IOException
Specified by:
flush in interface Flushable
Overrides:
flush in class HtmlResponseWriterImpl
Throws:
IOException


Copyright © 2014 The Apache Software Foundation. All rights reserved.