org.apache.tapestry5.internal.services
Interface PagePool

All Known Implementing Classes:
PagePoolImpl

public interface PagePool

Provides access to pages, creating them as necessary, and pooling them between requests.


Method Summary
 Page checkout(String pageName)
          Obtains a page instance from the pool via a logical page name.
 void discard(Page page)
          Discards a page, which occurs when there are errors invoking lifecycle methods on the page.
 void release(Page page)
          Releases a previously checked-out page.
 

Method Detail

checkout

Page checkout(String pageName)
Obtains a page instance from the pool via a logical page name. A page instance is created if no such page is currently available. The page pool enforces limits on the number of page instances (for any page name / locale combination) and may wait for a page to become available rather than create a new instance. There's also a hard limit, at which point an exception is raised.

Parameters:
pageName - the canonical page name
Returns:
a page instance
Throws:
RuntimeException - if the name is not valid, if the page cannot be loaded, or if an instance of the page can't be created.

release

void release(Page page)
Releases a previously checked-out page.

Parameters:
page - a previously checked-out page

discard

void discard(Page page)
Discards a page, which occurs when there are errors invoking lifecycle methods on the page.

Parameters:
page - a previously checked-out page


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