org.apache.tapestry.engine
Interface IPageSource

All Known Implementing Classes:
PageSource

public interface IPageSource

Abstracts the process of loading pages from thier specifications as well as pooling of pages once loaded.

If the required page is not available, a page source may use an instance of IPageLoader to actually load the page (and all of its nested components).

Author:
Howard Lewis Ship

Method Summary
 org.apache.hivemind.ClassResolver getClassResolver()
          Gets the class resolver used to load all pages / page components.
 IPage getPage(IRequestCycle cycle, String pageName)
          Gets a given page for the engine.
 void releasePage(IPage page)
          Invoked after the engine is done with the page (typically, after the response to the client has been sent).
 

Method Detail

getPage

IPage getPage(IRequestCycle cycle,
              String pageName)
Gets a given page for the engine. This may involve using a previously loaded page from a pool of available pages, or the page may be loaded as needed.

Parameters:
cycle - the current request cycle
pageName - the name of the page. May be qualified with a library id prefix, which may even be nested. Unqualified names are searched for extensively in the application namespace, and then in the framework namespace.
Returns:
The loaded page.
Throws:
PageNotFoundException - if pageName can't be resolved to a page specification (from which a page instance can be generated).
See Also:
PageSpecificationResolver.resolve(IRequestCycle, String)

releasePage

void releasePage(IPage page)
Invoked after the engine is done with the page (typically, after the response to the client has been sent). The page is returned to the pool for later reuse.

Parameters:
page - The page to release.

getClassResolver

org.apache.hivemind.ClassResolver getClassResolver()
Gets the class resolver used to load all pages / page components.

Returns:
ClassResolver instance used to load classes.


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.