|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry.engine.AbstractEngine org.apache.tapestry.engine.BaseEngine
public class BaseEngine
Concrete implementation of IEngine
used for ordinary
applications. All page state information is maintained in
the HttpSession
using
instances of SessionPageRecorder
.
Field Summary |
---|
Fields inherited from class org.apache.tapestry.engine.AbstractEngine |
---|
_specification, _specificationSource, _templateSource, DATA_SQUEEZER_NAME, DEFAULT_OUTPUT_ENCODING, ENHANCER_NAME, GLOBAL_NAME, OUTPUT_ENCODING_PROPERTY_NAME, PAGE_SOURCE_NAME, POOL_NAME, PROPERTY_SOURCE_NAME, RESOURCE_CHECKSUM_SOURCE_NAME, SCRIPT_SOURCE_NAME, SERVICE_MAP_NAME, SPECIFICATION_SOURCE_NAME, STRINGS_SOURCE_NAME, TEMPLATE_SOURCE_NAME, VISIT_CLASS_PROPERTY_NAME |
Constructor Summary | |
---|---|
BaseEngine()
|
Method Summary | |
---|---|
protected void |
cleanupAfterRequest(IRequestCycle cycle)
Removes all page recorders that contain no changes, or are marked for discard. |
IPageRecorder |
createPageRecorder(String pageName,
IRequestCycle cycle)
Creates a new page recorder for the named page. |
void |
extendDescription(org.apache.commons.lang.builder.ToStringBuilder builder)
Extends the description of the class generated by AbstractEngine.toString() . |
void |
forgetPage(String name)
Forgets changes to the named page by discarding the page recorder for the page. |
Collection |
getActivePageNames()
Returns an unmodifiable Collection of the page names for which
IPageRecorder instances exist. |
IPageRecorder |
getPageRecorder(String pageName,
IRequestCycle cycle)
Returns a recorder for a page. |
void |
readExternal(ObjectInput in)
Reconstructs the list of active page names written by writeExternal(ObjectOutput) . |
void |
writeExternal(ObjectOutput out)
Writes the engine's persistent state; this is simply the list of active page names. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BaseEngine()
Method Detail |
---|
protected void cleanupAfterRequest(IRequestCycle cycle)
cleanupAfterRequest
in class AbstractEngine
public void forgetPage(String name)
IEngine
This should be done if the page is no longer needed or relevant, otherwise the properties for the page will continue to be recorded by the engine, which is wasteful (especially if clustering or failover is employed on the application).
Throws an ApplicationRuntimeException
if there are uncommitted changes
for the recorder (in the current request cycle).
public Collection getActivePageNames()
Collection
of the page names for which
IPageRecorder
instances exist.
getActivePageNames
in class AbstractEngine
public IPageRecorder getPageRecorder(String pageName, IRequestCycle cycle)
IEngine
IEngine.createPageRecorder(String, IRequestCycle)
public IPageRecorder createPageRecorder(String pageName, IRequestCycle cycle)
IEngine
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
writeExternal(ObjectOutput)
.
readExternal
in interface Externalizable
readExternal
in class AbstractEngine
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class AbstractEngine
IOException
public void extendDescription(org.apache.commons.lang.builder.ToStringBuilder builder)
AbstractEngine
AbstractEngine.toString()
.
If a subclass adds additional instance variables that should be described
in the instance description, it may overide this method. This implementation
does nothing.
extendDescription
in class AbstractEngine
AbstractEngine.toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |