|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry.pageload.PageSource
public class PageSource
A source for pages for a particular application. Each application should have its own
PageSource, storing it into the ServletContextusing a
unique key (usually built from the application name).
The PageSource acts as a pool for IPageinstances. Pages are retrieved
from the pool using getPage(IRequestCycle, String, IMonitor)and are later returned to
the pool using releasePage(IPage).
TBD: Pooled pages stay forever. Need a strategy for cleaning up the pool, tracking which pages have been in the pool the longest, etc.
| Constructor Summary | |
|---|---|
PageSource()
|
|
| Method Summary | |
|---|---|
protected MultiKey |
buildKey(IEngine engine,
java.lang.String pageName)
Builds a key for a named page in the application's current locale. |
protected MultiKey |
buildKey(IPage page)
Builds a key from an existing page, using the page's name and locale. |
org.apache.hivemind.ClassResolver |
getClassResolver()
|
IPage |
getPage(IRequestCycle cycle,
java.lang.String pageName,
IMonitor monitor)
Gets the page from a pool, or otherwise loads the page. |
void |
releasePage(IPage page)
Returns the page to the appropriate pool. |
void |
setClassResolver(org.apache.hivemind.ClassResolver resolver)
|
void |
setLoader(IPageLoader loader)
|
void |
setPageSpecificationResolver(PageSpecificationResolver resolver)
|
void |
setPool(ObjectPool pool)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PageSource()
| Method Detail |
|---|
public org.apache.hivemind.ClassResolver getClassResolver()
getClassResolver in interface IPageSource
protected MultiKey buildKey(IEngine engine,
java.lang.String pageName)
protected MultiKey buildKey(IPage page)
public IPage getPage(IRequestCycle cycle,
java.lang.String pageName,
IMonitor monitor)
getPage in interface IPageSourcecycle - the current request cyclepageName - 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.monitor - informed of any page loading activityPageSpecificationResolver.resolve(IRequestCycle, String)public void releasePage(IPage page)
IPage.detach().
releasePage in interface IPageSourcepublic void setPool(ObjectPool pool)
public void setClassResolver(org.apache.hivemind.ClassResolver resolver)
public void setPageSpecificationResolver(PageSpecificationResolver resolver)
public void setLoader(IPageLoader loader)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||