* $Id: RenderKit.java,v 1.36 2007/04/27 22:00:10 ofung Exp $
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
* Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can obtain
* a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
* or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
* When distributing the software, include this License Header Notice in each
* file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
* Sun designates this particular file as subject to the "Classpath" exception
* as provided by Sun in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the License
* Header, with the fields enclosed by brackets  replaced by your own
* identifying information: "Portions Copyrighted [year]
* [name of copyright owner]"
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
RenderKit represents a collection of
instances that, together, know how to render
instances for a specific
s are specialized for
some combination of client device type, markup language, and/or
also acts as
a Factory for associated
instances, which perform the
actual rendering process for each component.
A typical JavaServer Faces implementation will configure one or
instances at web application startup. They
are made available through calls to the
instances are shared, they must be implemented in a thread-safe
manner. Due to limitations in the current specification having
RenderKit instances at play in the same
application requires a custom
instance that is aware of how to
deal with this case. This limitation will be lifted in a future
version of the spec.
RenderKit instance must also vend a
instance, which is used in the process of
saving and restoring tree structure and state.
// PENDING(edburns): remove limitation
Register the specified
instance, associated with the
to the set of
s registered with this
replacing any previously registered
combination of identifiers.
instance most recently registered for
the specified component
rendererType, if any; otherwise, return
Return an instance of
rendering technology specific state management decisions.
Use the provided
Writer to create a new
instance for the specified (optional) content
type, and character encoding.
Implementors are advised to consult the
getCharacterEncoding() method of class
to get the required value for the
characterEncoding for this method. Since the
for this response will already have been obtained (due to it
ultimately being passed to this method), we know that the
character encoding cannot change during the rendering of the
writerthe Writer around which this
must be built.
contentTypeListan "Accept header style" list of content types for this response, or
nullif the RenderKit should choose the best fit. As of the current version, the values accepted by the Standard render-kit for this parameter include any valid "Accept header style" String that includes the String
text/xml. This may change in a future version. The RenderKit must support a value for this argument that comes straight from the
AcceptHTTP header, and therefore requires parsing according to the specification of the
Acceptheader. Please see for the specification of the
characterEncodingsuch as "ISO-8859-1" for this ResponseWriter, or
RenderKitshould choose the best fit. Please see for a list of character encodings.
java.lang.IllegalArgumentExceptionif no matching content type can be found in
contentTypeList, no appropriate content type can be found with the implementation dependent best fit algorithm, or no matching character encoding can be found for the argument
Use the provided
OutputStream to create a new