com.liferay.faces.bridge.context
Class RenderRedirectWriterImpl

java.lang.Object
  extended by java.io.Writer
      extended by com.liferay.faces.bridge.context.WriterWrapper
          extended by com.liferay.faces.bridge.context.RenderRedirectWriter
              extended by com.liferay.faces.bridge.context.RenderRedirectWriterImpl
All Implemented Interfaces:
Closeable, Flushable, Appendable, javax.faces.FacesWrapper<Writer>

public class RenderRedirectWriterImpl
extends RenderRedirectWriter

This class supports the render-redirect feature by queuing up a list of all write operations. Calling the render() method causes the queued operations to be invoked. Conversely, not calling the method will prevent the queued operations from being invoked. This is necessary because in the case of a render-redirect, any markup written to the response in the initially rendered view must be discarded.

Author:
Neil Griffin

Nested Class Summary
protected  class RenderRedirectWriterImpl.CBufOffLenOutputOperation
           
protected  class RenderRedirectWriterImpl.CbufWriteOperation
           
protected  class RenderRedirectWriterImpl.CloseOperation
           
protected  class RenderRedirectWriterImpl.FlushOperation
           
protected  class RenderRedirectWriterImpl.IntWriteOperation
           
protected static interface RenderRedirectWriterImpl.OutputOperation
           
protected  class RenderRedirectWriterImpl.StrOffLenWriteOperation
           
protected  class RenderRedirectWriterImpl.StrWriteOperation
           
 
Field Summary
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
RenderRedirectWriterImpl(Writer writer)
           
 
Method Summary
 void close()
           
 void discard()
          Discards the buffered response output so that it will not be written to the wrapped Writer.
 void flush()
           
 Writer getWrapped()
           
 void render()
          Renders the buffered response output to the wrapped Writer.
 void write(char[] cbuf)
           
 void write(char[] cbuf, int off, int len)
           
 void write(int c)
           
 void write(String str)
           
 void write(String str, int off, int len)
           
 
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

RenderRedirectWriterImpl

public RenderRedirectWriterImpl(Writer writer)
Method Detail

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class WriterWrapper
Throws:
IOException

discard

public void discard()
Description copied from class: RenderRedirectWriter
Discards the buffered response output so that it will not be written to the wrapped Writer.

Specified by:
discard in class RenderRedirectWriter

flush

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

render

public void render()
            throws IOException
Description copied from class: RenderRedirectWriter
Renders the buffered response output to the wrapped Writer.

Specified by:
render in class RenderRedirectWriter
Throws:
IOException

write

public void write(char[] cbuf)
           throws IOException
Overrides:
write in class Writer
Throws:
IOException

write

public void write(int c)
           throws IOException
Overrides:
write in class Writer
Throws:
IOException

write

public void write(String str)
           throws IOException
Overrides:
write in class Writer
Throws:
IOException

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class WriterWrapper
Throws:
IOException

write

public void write(String str,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class Writer
Throws:
IOException

getWrapped

public Writer getWrapped()


Copyright © 2014 Liferay, Inc.. All Rights Reserved.