|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry5.internal.services.PageRenderQueueImpl
@Scope(value="perthread") public class PageRenderQueueImpl
This services keeps track of the page being rendered and the root command for the partial render, it is therefore request/thread scoped. There's a filter pipeline around the rendering, and that gets to be stateless because this service, at the end of the pipeline, is stateful.
| Constructor Summary | |
|---|---|
PageRenderQueueImpl(LoggerSource loggerSource)
|
|
| Method Summary | |
|---|---|
void |
addPartialMarkupRendererFilter(PartialMarkupRendererFilter filter)
Adds an optional filter to the rendering. |
Page |
getRenderingPage()
Returns the page that is rendering markup content. |
RenderCommand |
getRootRenderCommand()
Obtains the value previously supplied to PageRenderQueue.initializeForPartialPageRender(org.apache.tapestry5.runtime.RenderCommand). |
void |
initializeForCompletePage(Page page)
Initializes the queue for rendering of a complete page. |
void |
initializeForPartialPageRender(RenderCommand rootCommand)
Initializes the queue for rendering of a portion of a page. |
boolean |
isPartialRenderInitialized()
Returns true if PageRenderQueue.initializeForPartialPageRender(org.apache.tapestry5.runtime.RenderCommand) has been
invoked. |
void |
render(MarkupWriter writer)
Render to the write, as setup by the initialize method. |
void |
renderPartial(MarkupWriter writer,
JSONObject reply)
Performs a partial markup render, as configured via PageRenderQueue.initializeForPartialPageRender(org.apache.tapestry5.runtime.RenderCommand). |
void |
setRenderingPage(Page page)
Sets the default page that will render the response. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PageRenderQueueImpl(LoggerSource loggerSource)
| Method Detail |
|---|
public void initializeForCompletePage(Page page)
PageRenderQueue
initializeForCompletePage in interface PageRenderQueuepublic void setRenderingPage(Page page)
PageRenderQueue
setRenderingPage in interface PageRenderQueuepublic boolean isPartialRenderInitialized()
PageRenderQueuePageRenderQueue.initializeForPartialPageRender(org.apache.tapestry5.runtime.RenderCommand) has been
invoked.
isPartialRenderInitialized in interface PageRenderQueuepublic void initializeForPartialPageRender(RenderCommand rootCommand)
PageRenderQueue
initializeForPartialPageRender in interface PageRenderQueuepublic RenderCommand getRootRenderCommand()
PageRenderQueuePageRenderQueue.initializeForPartialPageRender(org.apache.tapestry5.runtime.RenderCommand).
This allows the "natural" renderer to be substituted or otherwise manipulated.
getRootRenderCommand in interface PageRenderQueuepublic Page getRenderingPage()
PageRenderQueue
getRenderingPage in interface PageRenderQueuepublic void render(MarkupWriter writer)
PageRenderQueue
render in interface PageRenderQueuewriter - to write markup topublic void addPartialMarkupRendererFilter(PartialMarkupRendererFilter filter)
PageRenderQueuePartialMarkupRenderer
service which are permanent, shared and stateless.
Filters are added to the end of the pipeline (after all permanent contributions).
Filters will be executed in the order in which they are added.
addPartialMarkupRendererFilter in interface PageRenderQueuefilter - to add to the pipeline
public void renderPartial(MarkupWriter writer,
JSONObject reply)
PageRenderQueuePageRenderQueue.initializeForPartialPageRender(org.apache.tapestry5.runtime.RenderCommand).
renderPartial in interface PageRenderQueuewriter - to which markup should be writtenreply - JSONObject which will contain the partial response
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||