javax.faces.render
Class RenderKit

java.lang.Object
  extended byjavax.faces.render.RenderKit

public abstract class RenderKit
extends java.lang.Object

RenderKit represents a collection of Renderer instances that, together, know how to render JavaServer Faces UIComponent instances for a specific client. Typically, RenderKits are specialized for some combination of client device type, markup language, and/or user Locale. A RenderKit also acts as a Factory for associated Renderer instances, which perform the actual rendering process for each component.

A typical JavaServer Faces implementation will configure one or more RenderKit instances at web application startup. They are made available through calls to the getRenderKit() methods of RenderKitFactory. Because RenderKit instances are shared, they must be implemented in a thread-safe manner.


Constructor Summary
RenderKit()
           
 
Method Summary
abstract  void addRenderer(java.lang.String rendererType, Renderer renderer)
          Add a new Renderer instance, associated with the specified rendererType, to the set of Renderers registered with this RenderKit.
abstract  Renderer getRenderer(java.lang.String rendererType)
          Create (if necessary) and return a Renderer instance with the specified renderer type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenderKit

public RenderKit()
Method Detail

addRenderer

public abstract void addRenderer(java.lang.String rendererType,
                                 Renderer renderer)

Add a new Renderer instance, associated with the specified rendererType, to the set of Renderers registered with this RenderKit.

Parameters:
rendererType - Renderer type of the new Renderer
renderer - The new Renderer instance
Throws:
java.lang.IllegalArgumentException - if a Renderer with the specified rendererType has already been registered
java.lang.NullPointerException - if rendererType or renderer is null

getRenderer

public abstract Renderer getRenderer(java.lang.String rendererType)

Create (if necessary) and return a Renderer instance with the specified renderer type. Subsequent calls to this method with the same rendererType, from the same web application, must return the same instance.

Parameters:
rendererType - Renderer type to be returned
Throws:
java.lang.IllegalArgumentException - if the requested renderer type is not supported by this RenderKit
java.lang.NullPointerException - if rendererType is null