Class PartialResponseWriterWrapper
- All Implemented Interfaces:
FacesWrapper<ResponseWriter>, Closeable, Flushable, Appendable, AutoCloseable
Provides a simple implementation of PartialResponseWriter that can be subclassed by developers wishing to
provide specialized behavior to an existing PartialResponseWriter instance. The default implementation of
all methods is to call through to the wrapped PartialResponseWriter obtained via getWrapped().
Usage: extend this class and push the implementation being wrapped to the constructor and use getWrapped() to
access the instance being getWrapped().
- Since:
- 5.0
-
Field Summary
Fields inherited from class PartialResponseWriter
RENDER_ALL_MARKER, VIEW_STATE_MARKER -
Constructor Summary
ConstructorsConstructorDescriptionIf this response writer has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor. -
Method Summary
Modifier and TypeMethodDescriptionappend(char c) The default behavior of this method is to callWriter.append(char)on the wrappedPartialResponseWriterobject obtained viagetWrapped().append(CharSequence csq) The default behavior of this method is to callWriter.append(CharSequence)on the wrappedPartialResponseWriterobject obtained viagetWrapped().append(CharSequence csq, int start, int end) The default behavior of this method is to callWriter.append(CharSequence, int, int)on the wrappedPartialResponseWriterobject obtained viagetWrapped().cloneWithWriter(Writer writer) The default behavior of this method is to callResponseWriterWrapper.cloneWithWriter(Writer)on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidclose()The default behavior of this method is to callResponseWriterWrapper.close()on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidThe default behavior of this method is to callPartialResponseWriter.delete(String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidendCDATA()The default behavior of this method is to callResponseWriterWrapper.endCDATA()on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidThe default behavior of this method is to callPartialResponseWriter.endDocument()on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidendElement(String name) The default behavior of this method is to callResponseWriterWrapper.endElement(String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidendError()The default behavior of this method is to callPartialResponseWriter.endError()on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidendEval()The default behavior of this method is to callPartialResponseWriter.endEval()on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidThe default behavior of this method is to callPartialResponseWriter.endExtension()on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidThe default behavior of this method is to callPartialResponseWriter.endInsert()on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidThe default behavior of this method is to callPartialResponseWriter.endUpdate()on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidflush()The default behavior of this method is to callResponseWriterWrapper.flush()on the wrappedPartialResponseWriterobject obtained viagetWrapped().The default behavior of this method is to callResponseWriterWrapper.getCharacterEncoding()on the wrappedPartialResponseWriterobject obtained viagetWrapped().The default behavior of this method is to callResponseWriterWrapper.getContentType()on the wrappedPartialResponseWriterobject obtained viagetWrapped().A class that implements this interface uses this method to return an instance of the class being wrapped.voidThe default behavior of this method is to callPartialResponseWriter.redirect(String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidThe default behavior of this method is to callResponseWriterWrapper.startCDATA()on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidThe default behavior of this method is to callPartialResponseWriter.startDocument()on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidstartElement(String name, UIComponent component) The default behavior of this method is to callResponseWriterWrapper.startElement(String, UIComponent)on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidstartError(String errorName) The default behavior of this method is to callPartialResponseWriter.startError(String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidThe default behavior of this method is to callPartialResponseWriter.startEval()on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidstartExtension(Map<String, String> attributes) The default behavior of this method is to callPartialResponseWriter.startExtension(Map)on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidstartInsertAfter(String targetId) The default behavior of this method is to callPartialResponseWriter.startInsertAfter(String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidstartInsertBefore(String targetId) The default behavior of this method is to callPartialResponseWriter.startInsertBefore(String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidstartUpdate(String targetId) The default behavior of this method is to callPartialResponseWriter.startUpdate(String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidupdateAttributes(String targetId, Map<String, String> attributes) The default behavior of this method is to callPartialResponseWriter.updateAttributes(String, Map)on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidwrite(char[] cbuf) The default behavior of this method is to callWriter.write(char[])on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidwrite(char[] cbuf, int off, int len) The default behavior of this method is to callResponseWriterWrapper.write(char[], int, int)on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidwrite(int c) The default behavior of this method is to callPartialResponseWriter.startDocument()on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidThe default behavior of this method is to callWriter.write(String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidThe default behavior of this method is to callWriter.write(String, int, int)on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidwriteAttribute(String name, Object value, String property) The default behavior of this method is to callResponseWriterWrapper.writeAttribute(String, Object, String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidwriteComment(Object comment) The default behavior of this method is to callResponseWriterWrapper.writeComment(Object)on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidwriteDoctype(String doctype) The default behavior of this method is to callResponseWriterWrapper.writeDoctype(String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidwritePreamble(String preamble) The default behavior of this method is to callResponseWriterWrapper.writePreamble(String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidwriteText(char[] text, int off, int len) The default behavior of this method is to callResponseWriterWrapper.writeText(char[], int, int)on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidwriteText(Object text, UIComponent component, String property) The default behavior of this method is to callResponseWriterWrapper.writeText(Object, UIComponent, String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidThe default behavior of this method is to callResponseWriterWrapper.writeText(Object, String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().voidwriteURIAttribute(String name, Object value, String property) The default behavior of this method is to callResponseWriterWrapper.writeURIAttribute(String, Object, String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().Methods inherited from class Writer
nullWriter
-
Constructor Details
-
PartialResponseWriterWrapper
If this response writer has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor. The
getWrapped()will then return the implementation being wrapped.- Parameters:
wrapped- The implementation being getWrapped().
-
-
Method Details
-
getWrapped
Description copied from interface:FacesWrapperA class that implements this interface uses this method to return an instance of the class being wrapped.
- Specified by:
getWrappedin interfaceFacesWrapper<ResponseWriter>- Overrides:
getWrappedin classResponseWriterWrapper- Returns:
- the wrapped instance.
-
getContentType
The default behavior of this method is to call
ResponseWriterWrapper.getContentType()on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
getContentTypein classResponseWriterWrapper- Returns:
- the content type
- See Also:
-
startDocument
The default behavior of this method is to call
PartialResponseWriter.startDocument()on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
startDocumentin classPartialResponseWriter- Throws:
IOException- if an input/output error occurs- See Also:
-
getCharacterEncoding
The default behavior of this method is to call
ResponseWriterWrapper.getCharacterEncoding()on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
getCharacterEncodingin classResponseWriterWrapper- Returns:
- the character encoding
- See Also:
-
flush
The default behavior of this method is to call
ResponseWriterWrapper.flush()on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Specified by:
flushin interfaceFlushable- Overrides:
flushin classResponseWriterWrapper- Throws:
IOException- See Also:
-
endDocument
The default behavior of this method is to call
PartialResponseWriter.endDocument()on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
endDocumentin classPartialResponseWriter- Throws:
IOException- if an input/output error occurs- See Also:
-
startElement
The default behavior of this method is to call
ResponseWriterWrapper.startElement(String, UIComponent)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
startElementin classResponseWriterWrapper- Parameters:
name- Name of the element to be startedcomponent- TheUIComponent(if any) to which this element corresponds. This component is inspected for its pass through attributes as described in the standard HTML_BASICRenderKitspecification.- Throws:
IOException- if an input/output error occurs- See Also:
-
startInsertBefore
The default behavior of this method is to call
PartialResponseWriter.startInsertBefore(String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
startInsertBeforein classPartialResponseWriter- Parameters:
targetId- ID of the node insertion should occur before- Throws:
IOException- if an input/output error occurs- See Also:
-
startCDATA
The default behavior of this method is to call
ResponseWriterWrapper.startCDATA()on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
startCDATAin classResponseWriterWrapper- Throws:
IOException- on any read/write error- See Also:
-
endCDATA
The default behavior of this method is to call
ResponseWriterWrapper.endCDATA()on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
endCDATAin classResponseWriterWrapper- Throws:
IOException- on any read/write error- See Also:
-
startInsertAfter
The default behavior of this method is to call
PartialResponseWriter.startInsertAfter(String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
startInsertAfterin classPartialResponseWriter- Parameters:
targetId- ID of the node insertion should occur after- Throws:
IOException- if an input/output error occurs- See Also:
-
endElement
The default behavior of this method is to call
ResponseWriterWrapper.endElement(String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
endElementin classResponseWriterWrapper- Parameters:
name- Name of the element to be ended- Throws:
IOException- on any read/write error- See Also:
-
write
The default behavior of this method is to call
PartialResponseWriter.startDocument()on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
writein classWriter- Throws:
IOException- See Also:
-
endInsert
The default behavior of this method is to call
PartialResponseWriter.endInsert()on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
endInsertin classPartialResponseWriter- Throws:
IOException- if an input/output error occurs- See Also:
-
writeAttribute
The default behavior of this method is to call
ResponseWriterWrapper.writeAttribute(String, Object, String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
writeAttributein classResponseWriterWrapper- Parameters:
name- Attribute name to be addedvalue- Attribute value to be addedproperty- Name of the property or attribute (if any) of theUIComponentassociated with the containing element, to which this generated attribute corresponds- Throws:
IOException- if an input/output error occurs- See Also:
-
writeURIAttribute
The default behavior of this method is to call
ResponseWriterWrapper.writeURIAttribute(String, Object, String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
writeURIAttributein classResponseWriterWrapper- Parameters:
name- Attribute name to be addedvalue- Attribute value to be addedproperty- Name of the property or attribute (if any) of theUIComponentassociated with the containing element, to which this generated attribute corresponds- Throws:
IOException- if an input/output error occurs- See Also:
-
startUpdate
The default behavior of this method is to call
PartialResponseWriter.startUpdate(String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
startUpdatein classPartialResponseWriter- Parameters:
targetId- ID of the node to be updated- Throws:
IOException- if an input/output error occurs- See Also:
-
write
The default behavior of this method is to call
Writer.write(char[])on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
writein classWriter- Throws:
IOException- See Also:
-
writeComment
The default behavior of this method is to call
ResponseWriterWrapper.writeComment(Object)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
writeCommentin classResponseWriterWrapper- Parameters:
comment- Text content of the comment- Throws:
IOException- if an input/output error occurs- See Also:
-
endUpdate
The default behavior of this method is to call
PartialResponseWriter.endUpdate()on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
endUpdatein classPartialResponseWriter- Throws:
IOException- if an input/output error occurs- See Also:
-
writeDoctype
The default behavior of this method is to call
ResponseWriterWrapper.writeDoctype(String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
writeDoctypein classResponseWriterWrapper- Parameters:
doctype- Text content of the doctype- Throws:
IOException- if an input/output error occurs- See Also:
-
updateAttributes
The default behavior of this method is to call
PartialResponseWriter.updateAttributes(String, Map)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
updateAttributesin classPartialResponseWriter- Parameters:
targetId- ID of the node to be updatedattributes- Map of attribute name/value pairs to be updated- Throws:
IOException- if an input/output error occurs- See Also:
-
write
The default behavior of this method is to call
Writer.write(String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
writein classWriter- Throws:
IOException- See Also:
-
writePreamble
The default behavior of this method is to call
ResponseWriterWrapper.writePreamble(String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
writePreamblein classResponseWriterWrapper- Parameters:
preamble- Text content of the preamble- Throws:
IOException- if an input/output error occurs- See Also:
-
write
The default behavior of this method is to call
Writer.write(String, int, int)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
writein classWriter- Throws:
IOException- See Also:
-
writeText
The default behavior of this method is to call
ResponseWriterWrapper.writeText(Object, String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
writeTextin classResponseWriterWrapper- Parameters:
text- Text to be writtenproperty- Name of the property or attribute (if any) of theUIComponentassociated with the containing element, to which this generated text corresponds- Throws:
IOException- if an input/output error occurs- See Also:
-
delete
The default behavior of this method is to call
PartialResponseWriter.delete(String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
deletein classPartialResponseWriter- Parameters:
targetId- ID of the node to be deleted- Throws:
IOException- if an input/output error occurs- See Also:
-
writeText
The default behavior of this method is to call
ResponseWriterWrapper.writeText(Object, UIComponent, String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
writeTextin classResponseWriterWrapper- Parameters:
text- Text to be writtencomponent- TheUIComponent(if any) to which this element correspondsproperty- Name of the property or attribute (if any) of theUIComponentassociated with the containing element, to which this generated text corresponds- Throws:
IOException- if an input/output error occurs- See Also:
-
redirect
The default behavior of this method is to call
PartialResponseWriter.redirect(String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
redirectin classPartialResponseWriter- Parameters:
url- URL to redirect to- Throws:
IOException- if an input/output error occurs- See Also:
-
writeText
The default behavior of this method is to call
ResponseWriterWrapper.writeText(char[], int, int)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
writeTextin classResponseWriterWrapper- Parameters:
text- Text to be writtenoff- Starting offset (zero-relative)len- Number of characters to be written- Throws:
IOException- if an input/output error occurs- See Also:
-
append
The default behavior of this method is to call
Writer.append(CharSequence)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException- See Also:
-
cloneWithWriter
The default behavior of this method is to call
ResponseWriterWrapper.cloneWithWriter(Writer)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
cloneWithWriterin classResponseWriterWrapper- Parameters:
writer- TheWriterthat is the output destination- Returns:
- the new
ResponseWriter - See Also:
-
startEval
The default behavior of this method is to call
PartialResponseWriter.startEval()on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
startEvalin classPartialResponseWriter- Throws:
IOException- if an input/output error occurs- See Also:
-
close
The default behavior of this method is to call
ResponseWriterWrapper.close()on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classResponseWriterWrapper- Throws:
IOException- See Also:
-
endEval
The default behavior of this method is to call
PartialResponseWriter.endEval()on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
endEvalin classPartialResponseWriter- Throws:
IOException- if an input/output error occurs- See Also:
-
startExtension
The default behavior of this method is to call
PartialResponseWriter.startExtension(Map)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
startExtensionin classPartialResponseWriter- Parameters:
attributes- String name/value pairs for extension element attributes- Throws:
IOException- if an input/output error occurs- See Also:
-
write
The default behavior of this method is to call
ResponseWriterWrapper.write(char[], int, int)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
writein classResponseWriterWrapper- Throws:
IOException- See Also:
-
append
The default behavior of this method is to call
Writer.append(CharSequence, int, int)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException- See Also:
-
endExtension
The default behavior of this method is to call
PartialResponseWriter.endExtension()on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
endExtensionin classPartialResponseWriter- Throws:
IOException- if an input/output error occurs- See Also:
-
startError
The default behavior of this method is to call
PartialResponseWriter.startError(String)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
startErrorin classPartialResponseWriter- Parameters:
errorName- Descriptive string for the error- Throws:
IOException- if an input/output error occurs- See Also:
-
append
The default behavior of this method is to call
Writer.append(char)on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException- See Also:
-
endError
The default behavior of this method is to call
PartialResponseWriter.endError()on the wrappedPartialResponseWriterobject obtained viagetWrapped().- Overrides:
endErrorin classPartialResponseWriter- Throws:
IOException- if an input/output error occurs- See Also:
-