|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RendererFactory<A extends Action>
A renderer factory is a factory that can create Renderer
objects. An extension point may provide a default factory
(ExtensionPoint.getRendererFactory()
). If allowed by the
extension point an extension may provide it's own factory
implementation (Extension.getRendererFactory()
.
Renderer factory implementations must be thread-safe, since a single instance of the factory may have to serve multiple requests at the same time.
Note 1! A single factory instance may be used by more than one extension/extension point. This is at the control of the client application.
Note 2! The BASE web-client uses the XmlLoader
to
define extensions. The XmlLoader
always create a
separate factory instance for each extension/extension point.
The XmlLoader
also requires that the factories has
a public no-argument constructor.
Method Summary | |
---|---|
Renderer<? super A> |
getRenderer(InvokationContext<? extends A> context)
Get a renderer for a given context. |
void |
prepareContext(InvokationContext<? extends A> context)
This method is called once for each request/use of an extension and should be used by a factory to initialise the context with resources that the actions may need. |
Method Detail |
---|
void prepareContext(InvokationContext<? extends A> context)
JspContext
.
Note! This method has no return value as opposed to
ActionFactory.prepareContext(InvokationContext)
. The
simple reason is that once we get to the point of rendering it
is already known that the extension is enabled.
context
- The current invokation contextRenderer<? super A> getRenderer(InvokationContext<? extends A> context)
context
- The current invokation context
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |