|
Java EE 5 SDK 深圳电信培训中心.徐海蛟老师. |
||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 |
javax.faces.render Class RenderKit
java.lang.Object javax.faces.render.RenderKit
public abstract class RenderKit
- extends Object
RenderKit represents a collection of
Renderer
instances that, together, know how to render
JavaServer Faces UIComponent
instances for a specific
client. Typically, RenderKit
s 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. Due to limitations in the current specification having
multiple RenderKit
instances at play in the same
application requires a custom ViewHandler
instance that is aware of how to
deal with this case. This limitation will be lifted in a future
version of the spec.
The RenderKit
instance must also vend a ResponseStateManager
instance, which is used in the process of
saving and restoring tree structure and state.
构造器摘要 | |
---|---|
RenderKit()
|
方法摘要 | |
---|---|
abstract void |
addRenderer(String family,
String rendererType,
Renderer renderer)
Register the specified Renderer instance, associated with the
specified component family and rendererType ,
to the set of Renderer s registered with this RenderKit ,
replacing any previously registered Renderer for this
combination of identifiers. |
abstract ResponseStream |
createResponseStream(OutputStream out)
Use the provided OutputStream to create a new
ResponseStream instance. |
abstract ResponseWriter |
createResponseWriter(Writer writer,
String contentTypeList,
String characterEncoding)
Use the provided Writer to create a new ResponseWriter instance for the specified (optional) content
type, and character encoding. |
abstract Renderer |
getRenderer(String family,
String rendererType)
Return the Renderer instance most recently registered for
the specified component family and
rendererType , if any; otherwise, return
null . |
abstract ResponseStateManager |
getResponseStateManager()
Return an instance of ResponseStateManager to handle
rendering technology specific state management decisions. |
类方法继承 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
构造器详细信息 |
---|
RenderKit
public RenderKit()
方法详细信息 |
---|
addRenderer
public abstract void addRenderer(String family, String rendererType, Renderer renderer)
Register the specified
Renderer
instance, associated with the specified componentfamily
andrendererType
, to the set ofRenderer
s registered with thisRenderKit
, replacing any previously registeredRenderer
for this combination of identifiers.- 参数:
family
- Component family of theRenderer
to registerrendererType
- Renderer type of theRenderer
to registerrenderer
-Renderer
instance we are registering- 抛出异常:
NullPointerException
- iffamily
orrendererType
orrenderer
is null
getRenderer
public abstract Renderer getRenderer(String family, String rendererType)
Return the
Renderer
instance most recently registered for the specified componentfamily
andrendererType
, if any; otherwise, returnnull
.- 参数:
family
- Component family of the requestedRenderer
instancerendererType
- Renderer type of the requestedRenderer
instance- 抛出异常:
NullPointerException
- iffamily
orrendererType
isnull
getResponseStateManager
public abstract ResponseStateManager getResponseStateManager()
Return an instance of
ResponseStateManager
to handle rendering technology specific state management decisions.
createResponseWriter
public abstract ResponseWriter createResponseWriter(Writer writer, String contentTypeList, String characterEncoding)
Use the provided
Writer
to create a newResponseWriter
instance for the specified (optional) content type, and character encoding.Implementors are advised to consult the
getCharacterEncoding()
method of classServletResponse
to get the required value for the characterEncoding for this method. Since theWriter
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 response.- 参数:
writer
- the Writer around which thisResponseWriter
must be built.contentTypeList
- an "Accept header style" list of content types for this response, ornull
if 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 Stringtext/html
,application/xhtml+xml
,application/xml
ortext/xml
. This may change in a future version. The RenderKit must support a value for this argument that comes straight from theAccept
HTTP header, and therefore requires parsing according to the specification of theAccept
header. Please see Section 14.1 of RFC 2616 for the specification of theAccept
header.characterEncoding
- such as "ISO-8859-1" for this ResponseWriter, ornull
if theRenderKit
should choose the best fit. Please see the IANA for a list of character encodings.- 返回:
- a new
ResponseWriter
. - 抛出异常:
IllegalArgumentException
- if no matching content type can be found incontentTypeList
, no appropriate content type can be found with the implementation dependent best fit algorithm, or no matching character encoding can be found for the argumentcharacterEncoding
.
createResponseStream
public abstract ResponseStream createResponseStream(OutputStream out)
Use the provided
OutputStream
to create a newResponseStream
instance.
|
Java EE 5 SDK 深圳电信培训中心.徐海蛟老师. |
||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 |
提交错误或意见
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.