|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
IPageSource.java | - | - | - | - |
|
1 |
// Copyright 2004, 2005 The Apache Software Foundation
|
|
2 |
//
|
|
3 |
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4 |
// you may not use this file except in compliance with the License.
|
|
5 |
// You may obtain a copy of the License at
|
|
6 |
//
|
|
7 |
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8 |
//
|
|
9 |
// Unless required by applicable law or agreed to in writing, software
|
|
10 |
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11 |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12 |
// See the License for the specific language governing permissions and
|
|
13 |
// limitations under the License.
|
|
14 |
|
|
15 |
package org.apache.tapestry.engine;
|
|
16 |
|
|
17 |
import org.apache.hivemind.ClassResolver;
|
|
18 |
import org.apache.tapestry.IPage;
|
|
19 |
import org.apache.tapestry.IRequestCycle;
|
|
20 |
|
|
21 |
/**
|
|
22 |
* Abstracts the process of loading pages from thier specifications as
|
|
23 |
* well as pooling of pages once loaded.
|
|
24 |
*
|
|
25 |
* <p>If the required page is not available, a page source may use an
|
|
26 |
* instance of {@link IPageLoader} to actually load the
|
|
27 |
* page (and all of its nested components).
|
|
28 |
*
|
|
29 |
* @author Howard Lewis Ship
|
|
30 |
*
|
|
31 |
**/
|
|
32 |
|
|
33 |
public interface IPageSource |
|
34 |
{ |
|
35 |
/**
|
|
36 |
* Gets a given page for the engine. This may involve using a previously
|
|
37 |
* loaded page from a pool of available pages, or the page may be loaded as needed.
|
|
38 |
*
|
|
39 |
* @param cycle the current request cycle
|
|
40 |
* @param pageName the name of the page. May be qualified with a library id prefix, which
|
|
41 |
* may even be nested. Unqualified names are searched for extensively in the application
|
|
42 |
* namespace, and then in the framework namespace.
|
|
43 |
* @param monitor informed of any page loading activity
|
|
44 |
*
|
|
45 |
**/
|
|
46 |
|
|
47 |
public IPage getPage(IRequestCycle cycle, String pageName, IMonitor monitor);
|
|
48 |
|
|
49 |
/**
|
|
50 |
* Invoked after the engine is done with the page
|
|
51 |
* (typically, after the response to the client has been sent).
|
|
52 |
* The page is returned to the pool for later reuse.
|
|
53 |
*
|
|
54 |
**/
|
|
55 |
|
|
56 |
public void releasePage(IPage page); |
|
57 |
|
|
58 |
/**
|
|
59 |
*
|
|
60 |
* @since 3.0
|
|
61 |
*
|
|
62 |
**/
|
|
63 |
|
|
64 |
public ClassResolver getClassResolver();
|
|
65 |
|
|
66 |
} |
|