javax.portlet.faces
Interface BridgeWriteBehindResponse


public interface BridgeWriteBehindResponse

The BridgeWriteBehindResponse interface defines the api the bridge relies on to acquire the buffered JSP output from the response(Wrapper) used to handle the Faces implementation dependent writeBehindResponse methodlogy/interface.

Note: the Portlet 1.0 Bridge relied on Portlet 1.0 which didn't support response wrappers. In that version the writeBehindResponse behavior is provided in a Servlet ResponseWrapper inserted in a Servlet filter set up to be called on included JSPs. In Portlet 2.0 Bridge this behavior can now be implemented directly in a Portlet ResponseWrapper which can then be registered for use with the bridge. So that the bridge recognizes and use this support, such wrappers must implement this interface.

Implementations must be one of the Portlet 2.0 ResponseWrappers and have a null constructor that utilizes FacesContext.getCurrentInstance().getExternalContext().getResponse() to acquire the response to be wrapped.


Method Summary
 byte[] getBytes()
          Called by the bridge after dispatching is complete to acquire the AfterJSPContent when the response has been written as bytes.
 char[] getChars()
          Called by the bridge after dispatching is complete to acquire the AfterJSPContent when the response has been written as characters.
 boolean isBytes()
          Called by the bridge after dispatching is complete to determine whether the JSP AfterViewContent was written as bytes (written via an OutputStream
 boolean isChars()
          Called by the bridge after dispatching is complete to determine whether the JSP AfterViewContent was written as chars (written via a PrintWriter
 

Method Detail

isChars

boolean isChars()
Called by the bridge after dispatching is complete to determine whether the JSP AfterViewContent was written as chars (written via a PrintWriter

Returns:
true if the response (buffer) is represented as chars written via the PrintWriter, false otherwise.

getChars

char[] getChars()
Called by the bridge after dispatching is complete to acquire the AfterJSPContent when the response has been written as characters. The bridge writes this buffer to the (real) response.

Returns:
the response as a char[].

isBytes

boolean isBytes()
Called by the bridge after dispatching is complete to determine whether the JSP AfterViewContent was written as bytes (written via an OutputStream

Returns:
true if the response (buffer) is represented as bytes written via the OutputStream, false otherwise.

getBytes

byte[] getBytes()
Called by the bridge after dispatching is complete to acquire the AfterJSPContent when the response has been written as bytes. The bridge writes this buffer to the (real) response.

Returns:
the response as a byte[].


Copyright © 2007-2010 The Apache Software Foundation. All Rights Reserved.