|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry.engine.AbstractEngine
public abstract class AbstractEngine
Basis for building real Tapestry applications. Immediate subclasses
provide different strategies for managing page state and other resources
between request cycles.
Uses a shared instance of
ITemplateSource
, ISpecificationSource
,
IScriptSource
and IComponentMessagesSource
stored as attributes of the ServletContext
(they will be shared by all sessions).
An application is designed to be very lightweight.
Particularily, it should never hold references to any
IPage
or IComponent
objects. The entire system is
based upon being able to quickly rebuild the state of any page(s).
Where possible, instance variables should be transient. They
can be restored inside setupForRequest(RequestContext)
.
In practice, a subclass (usually BaseEngine
)
is used without subclassing. Instead, a
visit object is specified. To facilitate this, the application specification
may include a property, org.apache.tapestry.visit-class
which is the class name to instantiate when a visit object is first needed. See
createVisit(IRequestCycle)
for more details.
Some of the classes' behavior is controlled by JVM system properties (typically only used during development):
Property | Description |
---|---|
org.apache.tapestry.enable-reset-service | If true, enabled an additional service, reset, that
allow page, specification and template caches to be cleared on demand.
See isResetServiceEnabled() . |
org.apache.tapestry.disable-caching | If true, then the page, specification, template and script caches will be cleared after each request. This slows things down, but ensures that the latest versions of such files are used. Care should be taken that the source directories for the files preceeds any versions of the files available in JARs or WARs. |
Field Summary | |
---|---|
protected IApplicationSpecification |
_specification
The specification for the application, which lives in the ServletContext . |
protected ISpecificationSource |
_specificationSource
The source for component specifications, stored in the ServletContext (like _templateSource ). |
protected ITemplateSource |
_templateSource
The source for template data. |
protected static String |
DATA_SQUEEZER_NAME
Servlet context attribute name for a shared instance of DataSqueezer . |
static String |
DEFAULT_OUTPUT_ENCODING
The default encoding that will be used when generating the output. |
protected static String |
ENHANCER_NAME
Name of a shared instance of IComponentClassEnhancer
stored in the ServletContext . |
static String |
GLOBAL_NAME
The base name for the servlet context key used to store the application-defined Global object, if any. |
static String |
OUTPUT_ENCODING_PROPERTY_NAME
The name of the application property that will be used to determine the encoding to use when generating the output |
protected static String |
PAGE_SOURCE_NAME
Servlet context attribute name for the IPageSource
instance. |
protected static String |
POOL_NAME
|
protected static String |
PROPERTY_SOURCE_NAME
Constant used to store a IPropertyHolder
in the servlet context. |
protected static String |
RESOURCE_CHECKSUM_SOURCE_NAME
Servlet context attribute name for a shared instance of ResourceChecksumSource . |
protected static String |
SCRIPT_SOURCE_NAME
The name of the context attribute for the IScriptSource instance. |
protected static String |
SERVICE_MAP_NAME
|
protected static String |
SPECIFICATION_SOURCE_NAME
Servlet context attribute name for the default ISpecificationSource
instance. |
protected static String |
STRINGS_SOURCE_NAME
The name of the context attribute for the IComponentMessagesSource
instance. |
protected static String |
TEMPLATE_SOURCE_NAME
Servlet context attribute name for the default ITemplateSource
instance. |
static String |
VISIT_CLASS_PROPERTY_NAME
The name of the application specification property used to specify the class of the visit object. |
Constructor Summary | |
---|---|
AbstractEngine()
|
Method Summary | |
---|---|
protected void |
activateExceptionPage(IRequestCycle cycle,
ResponseOutputStream output,
Throwable cause)
Sets the Exception page's exception property, then renders the Exception page. |
protected abstract void |
cleanupAfterRequest(IRequestCycle cycle)
Invoked at the end of the request cycle to release any resources specific to the request cycle. |
void |
clearCachedData()
Discards all cached pages, component specifications and templates. |
protected IComponentClassEnhancer |
createComponentClassEnhancer(RequestContext context)
Invoked from setupForRequest(RequestContext) . |
IComponentMessagesSource |
createComponentStringsSource(RequestContext context)
Invoked from setupForRequest(RequestContext) to provide
a new instance of IComponentMessagesSource . |
DataSqueezer |
createDataSqueezer()
Invoked from setupForRequest(RequestContext) to create
a DataSqueezer when needed (typically, just the very first time). |
protected Object |
createGlobal(RequestContext context)
Creates the shared Global object. |
protected IPageSource |
createPageSource(RequestContext context)
Invoked from setupForRequest(RequestContext) to provide
an instance of IPageSource that will be stored into
the ServletContext . |
protected Pool |
createPool(RequestContext context)
Returns an new instance of Pool , with the standard
set of adaptors, plus BSFManagerPoolableAdaptor for
BSFManager . |
protected IPropertySource |
createPropertySource(RequestContext context)
Creates a shared property source that will be stored into the servlet context. |
protected IRequestCycle |
createRequestCycle(RequestContext context,
IEngineService service,
IMonitor monitor)
Invoked from service(RequestContext) to create an instance of
IRequestCycle for the current request. |
protected ResourceChecksumSource |
createResourceChecksumSource()
Invoked from setupForRequest(RequestContext) to provide
an instance of ResourceChecksumSource that will be stored into
the ServletContext . |
protected IScriptSource |
createScriptSource(RequestContext context)
Invoked from setupForRequest(RequestContext) to provide
an instance of IScriptSource that will be stored into
the ServletContext . |
protected ISpecificationSource |
createSpecificationSource(RequestContext context)
Invoked from setupForRequest(RequestContext) to provide
an instance of ISpecificationSource that will be stored into
the ServletContext . |
protected ITemplateSource |
createTemplateSource(RequestContext context)
Invoked from setupForRequest(RequestContext) to provide
an instance of ITemplateSource that will be stored into
the ServletContext . |
protected Object |
createVisit(IRequestCycle cycle)
Invoked to lazily create a new visit object when it is first referenced (by getVisit(IRequestCycle) ). |
protected void |
extendDescription(org.apache.commons.lang.builder.ToStringBuilder builder)
Extends the description of the class generated by toString() . |
protected String |
extractServiceName(RequestContext context)
Invoked from service(RequestContext) to extract, from the URL,
the name of the service. |
abstract Collection |
getActivePageNames()
Implemented by subclasses to return the names of the active pages (pages for which recorders exist). |
IComponentClassEnhancer |
getComponentClassEnhancer()
Returns an object that can create enhanced versions of component classes. |
IComponentMessagesSource |
getComponentMessagesSource()
Returns a shared object that allows components to find their set of localized strings. |
String |
getContextPath()
Returns the context path, the prefix to apply to any URLs so that they are recognized as belonging to the Servlet 2.2 context. |
DataSqueezer |
getDataSqueezer()
Returns a shared instance of DataSqueezer . |
protected String |
getDefaultOutputEncoding()
The encoding to be used if none has been defined using the output encoding property. |
protected String |
getExceptionPageName()
|
Object |
getGlobal()
Returns the global object for the application. |
boolean |
getHasVisit()
|
ListenerMap |
getListeners()
Allows subclasses to include listener methods easily. |
Locale |
getLocale()
Returns the locale for the engine. |
IMonitor |
getMonitor(RequestContext context)
Overriden in subclasses that support monitoring. |
String |
getOutputEncoding()
Returns the encoding to be used to generate the servlet responses and accept the servlet requests. |
IPageSource |
getPageSource()
Returns the object used to load a page from its specification. |
Pool |
getPool()
Returns a Pool that is used
to store all manner of objects that are needed throughout the system. |
IPropertySource |
getPropertySource()
Returns a IPropertySource that should be
used to obtain configuration data. |
ResourceChecksumSource |
getResourceChecksumSource()
Returns an object that can compute the checksum of a resource. |
IResourceResolver |
getResourceResolver()
Returns an object which can find resources and classes. |
IScriptSource |
getScriptSource()
Returns a source for parsed IScript s. |
IEngineService |
getService(String name)
Returns a service with the given name. |
String |
getServletPath()
Returns the URL path that corresponds to the servlet for the application. |
IApplicationSpecification |
getSpecification()
Returns the specification, if available, or null otherwise. |
ISpecificationSource |
getSpecificationSource()
Returns the source of all component specifications for the application. |
protected String |
getStaleLinkPageName()
|
protected String |
getStaleSessionPageName()
|
ITemplateSource |
getTemplateSource()
Returns the source for HTML templates. |
Object |
getVisit()
Gets the visit object, if it has been created already. |
Object |
getVisit(IRequestCycle cycle)
Gets the visit object, invoking createVisit(IRequestCycle) to create
it lazily if needed. |
protected void |
handlePageRedirectException(PageRedirectException ex,
IRequestCycle cycle,
ResponseOutputStream output)
Handles PageRedirectException which involves
executing IPage.validate(IRequestCycle) on the target page
(of the exception), until either a loop is found, or a page
succesfully validates and can be activated. |
protected void |
handleRedirectException(IRequestCycle cycle,
RedirectException ex)
Invoked when a RedirectException is thrown during the processing of a request. |
protected void |
handleStaleLinkException(StaleLinkException ex,
IRequestCycle cycle,
ResponseOutputStream output)
Invoked by service(RequestContext) if a StaleLinkException
is thrown by the service . |
protected void |
handleStaleSessionException(StaleSessionException ex,
IRequestCycle cycle,
ResponseOutputStream output)
Invoked by service(RequestContext) if a StaleSessionException
is thrown by the service . |
boolean |
isDirty()
Returns true if the engine has (potentially) changed state since the last time it was stored into the HttpSession . |
boolean |
isResetServiceEnabled()
Returns true if the reset service is curently enabled. |
boolean |
isStateful()
Returns true if the engine has state and, therefore, should be stored in the HttpSession. |
protected void |
markDirty()
Invoked to set the dirty flag, indicating that the engine should be stored into the HttpSession . |
void |
readExternal(ObjectInput in)
Reads the state serialized by writeExternal(ObjectOutput) . |
protected void |
redirect(String pageName,
IRequestCycle cycle,
ResponseOutputStream out,
ApplicationRuntimeException exception)
Invoked, typically, when an exception occurs while servicing the request. |
void |
renderResponse(IRequestCycle cycle,
ResponseOutputStream output)
Invoked by a service to force the page selected by the IRequestCycle
to be renderred. |
void |
reportException(String reportTitle,
Throwable ex)
Writes a detailed report of the exception to System.err . |
void |
restart(IRequestCycle cycle)
Invalidates the session, then redirects the client web browser to the servlet's prefix, starting a new visit. |
boolean |
service(RequestContext context)
Delegate method for the servlet. |
void |
setLocale(Locale value)
Changes the locale for the engine. |
protected void |
setStateful()
Invoked by subclasses to indicate that some state must now be stored in the engine (and that the engine should now be stored in the HttpSession). |
protected void |
setupForRequest(RequestContext context)
Invoked from service(RequestContext) to ensure that the engine's
instance variables are setup. |
void |
setVisit(Object value)
Updates the visit object and sets the dirty flag . |
String |
toString()
Generates a description of the instance. |
void |
valueBound(HttpSessionBindingEvent arg0)
Clears the dirty flag when a engine is stored into the HttpSession . |
void |
valueUnbound(HttpSessionBindingEvent arg0)
Does nothing. |
void |
writeExternal(ObjectOutput out)
Writes the following properties: locale name ( Locale.toString() )
visit
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String GLOBAL_NAME
public static final String OUTPUT_ENCODING_PROPERTY_NAME
public static final String DEFAULT_OUTPUT_ENCODING
protected transient IApplicationSpecification _specification
ServletContext
. If the
session (and application) moves to a different context (i.e.,
a different JVM), then
we want to reconnect to the specification in the new context.
A check is made on every request
cycle as needed.
protected transient ITemplateSource _templateSource
ServletContext
as a named attribute.
After de-serialization, the application can re-connect to
the template source (or create a new one).
protected transient ISpecificationSource _specificationSource
ServletContext
(like _templateSource
).
protected static final String SCRIPT_SOURCE_NAME
IScriptSource
instance.
The application's name is appended.
protected static final String STRINGS_SOURCE_NAME
IComponentMessagesSource
instance. The application's name is appended.
public static final String VISIT_CLASS_PROPERTY_NAME
protected static final String TEMPLATE_SOURCE_NAME
ITemplateSource
instance. The application's name is appended.
protected static final String SPECIFICATION_SOURCE_NAME
ISpecificationSource
instance. The application's name is appended.
protected static final String PAGE_SOURCE_NAME
IPageSource
instance. The application's name is appended.
protected static final String DATA_SQUEEZER_NAME
DataSqueezer
. The instance is actually shared
between Tapestry applications within the same context
(which will have the same ClassLoader).
protected static final String RESOURCE_CHECKSUM_SOURCE_NAME
ResourceChecksumSource
.
protected static final String PROPERTY_SOURCE_NAME
IPropertyHolder
in the servlet context.
protected static final String SERVICE_MAP_NAME
protected static final String POOL_NAME
protected static final String ENHANCER_NAME
IComponentClassEnhancer
stored in the ServletContext
.
Constructor Detail |
---|
public AbstractEngine()
Method Detail |
---|
protected void activateExceptionPage(IRequestCycle cycle, ResponseOutputStream output, Throwable cause) throws ServletException
If the render throws an exception, then copious output is sent to
System.err
and a ServletException
is thrown.
ServletException
public void reportException(String reportTitle, Throwable ex)
System.err
.
reportException
in interface IEngineServiceView
protected abstract void cleanupAfterRequest(IRequestCycle cycle)
protected void extendDescription(org.apache.commons.lang.builder.ToStringBuilder builder)
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.
toString()
public Locale getLocale()
ApplicationServlet
but may be updated
by the application.
getLocale
in interface IEngine
public IMonitor getMonitor(RequestContext context)
IMonitor
that is appropriate for the request cycle described
by the RequestContext
.
The monitor is used to create a RequestCycle
.
This implementation uses a IMonitorFactory
to create the monitor instance. The factory
is provided as an application extension. If the application
extension does not exist, DefaultMonitorFactory
is used.
As of release 3.0, this method should not return null.
public IPageSource getPageSource()
IEngine
getPageSource
in interface IEngine
public IEngineService getService(String name)
setupForRequest(RequestContext)
.
getService
in interface IEngine
public String getServletPath()
IEngine
IEngineService
that need
to construct URLs for the application. This value will include
the context path.
getServletPath
in interface IEngine
public String getContextPath()
getContextPath
in interface IEngine
ContextAsset
public IApplicationSpecification getSpecification()
To facilitate deployment across multiple servlet containers, the
application is serializable. However, the reference to the specification
is transient. When an application instance is deserialized, it reconnects
with the application specification by locating it in the ServletContext
or parsing it fresh.
getSpecification
in interface IEngine
public ISpecificationSource getSpecificationSource()
IEngine
getSpecificationSource
in interface IEngine
createSpecificationSource(RequestContext)
public ITemplateSource getTemplateSource()
IEngine
getTemplateSource
in interface IEngine
createTemplateSource(RequestContext)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
writeExternal(ObjectOutput)
.
This always set the stateful flag. By default, a deserialized session is stateful (else, it would not have been serialized).
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
Locale.toString()
)
writeExternal
in interface Externalizable
IOException
protected void redirect(String pageName, IRequestCycle cycle, ResponseOutputStream out, ApplicationRuntimeException exception) throws IOException, ServletException
IOException
ServletException
public void renderResponse(IRequestCycle cycle, ResponseOutputStream output) throws ServletException, IOException
IEngineServiceView
IRequestCycle
to be renderred. This takes care of a number of bookkeeping issues, such
as committing changes in page recorders.
renderResponse
in interface IEngineServiceView
ServletException
IOException
public void restart(IRequestCycle cycle) throws IOException
Subclasses should perform their own restart (if necessary, which is rarely) before invoking this implementation.
restart
in interface IEngineServiceView
IOException
public boolean service(RequestContext context) throws ServletException, IOException
service
in interface IEngine
ServletException
IOException
protected void handlePageRedirectException(PageRedirectException ex, IRequestCycle cycle, ResponseOutputStream output) throws IOException, ServletException
PageRedirectException
which involves
executing IPage.validate(IRequestCycle)
on the target page
(of the exception), until either a loop is found, or a page
succesfully validates and can be activated.
This should generally not be overriden in subclasses.
IOException
ServletException
protected IRequestCycle createRequestCycle(RequestContext context, IEngineService service, IMonitor monitor)
service(RequestContext)
to create an instance of
IRequestCycle
for the current request. This implementation creates
an returns an instance of RequestCycle
.
protected void handleStaleLinkException(StaleLinkException ex, IRequestCycle cycle, ResponseOutputStream output) throws IOException, ServletException
service(RequestContext)
if a StaleLinkException
is thrown by the service
. This implementation
sets the message property of the StaleLink page to the
message provided in the exception,
then invokes
redirect(String, IRequestCycle, ResponseOutputStream, ApplicationRuntimeException)
to render the StaleLink page.
Subclasses may overide this method (without invoking this implementation). A common practice is to present an error message on the application's Home page.
Alternately, the application may provide its own version of the StaleLink page, overriding the framework's implementation (probably a good idea, because the default page hints at "application errors" and isn't localized). The overriding StaleLink implementation must implement a message property of type String.
IOException
ServletException
protected void handleStaleSessionException(StaleSessionException ex, IRequestCycle cycle, ResponseOutputStream output) throws IOException, ServletException
service(RequestContext)
if a StaleSessionException
is thrown by the service
. This implementation
invokes
redirect(String, IRequestCycle, ResponseOutputStream, ApplicationRuntimeException)
to render the StaleSession page.
Subclasses may overide this method (without invoking this implementation). A common practice is to present an eror message on the application's Home page.
IOException
ServletException
public void clearCachedData()
clearCachedData
in interface IEngineServiceView
public void setLocale(Locale value)
setLocale
in interface IEngine
protected void setupForRequest(RequestContext context)
service(RequestContext)
to ensure that the engine's
instance variables are setup. This allows the application a chance to
restore transient variables that will not have survived deserialization.
Determines the servlet prefix: this is the base URL used by
services
to build URLs. It consists
of two parts: the context path and the servlet path.
The servlet path is retrieved from HttpServletRequest.getServletPath()
.
The context path is retrieved from HttpServletRequest.getContextPath()
.
The global object is retrieved from IEngine.getGlobal()
method.
The final path is available via the getServletPath()
method.
In addition, this method locates and/or creates the:
IComponentClassEnhancer
Pool
ITemplateSource
ISpecificationSource
IPageSource
IEngineService
Map
IScriptSource
IComponentMessagesSource
IPropertySource
This order is important, because some of the later shared objects
depend on some of the earlier shared objects already having
been located or created
(especially pool
).
Subclasses should invoke this implementation first, then perform their own setup.
public IComponentMessagesSource createComponentStringsSource(RequestContext context)
setupForRequest(RequestContext)
to provide
a new instance of IComponentMessagesSource
.
DefaultComponentMessagesSource
protected IScriptSource createScriptSource(RequestContext context)
setupForRequest(RequestContext)
to provide
an instance of IScriptSource
that will be stored into
the ServletContext
. Subclasses may override this method
to provide a different implementation.
DefaultScriptSource
protected IPageSource createPageSource(RequestContext context)
setupForRequest(RequestContext)
to provide
an instance of IPageSource
that will be stored into
the ServletContext
. Subclasses may override this method
to provide a different implementation.
PageSource
protected ISpecificationSource createSpecificationSource(RequestContext context)
setupForRequest(RequestContext)
to provide
an instance of ISpecificationSource
that will be stored into
the ServletContext
. Subclasses may override this method
to provide a different implementation.
DefaultSpecificationSource
protected ITemplateSource createTemplateSource(RequestContext context)
setupForRequest(RequestContext)
to provide
an instance of ITemplateSource
that will be stored into
the ServletContext
. Subclasses may override this method
to provide a different implementation.
DefaultTemplateSource
protected ResourceChecksumSource createResourceChecksumSource()
setupForRequest(RequestContext)
to provide
an instance of ResourceChecksumSource
that will be stored into
the ServletContext
. Subclasses may override this method
to provide a different implementation.
ResourceChecksumSourceImpl
that uses MD5 and Hex encoding.public IResourceResolver getResourceResolver()
getResourceResolver
in interface IEngine
public String toString()
extendDescription(ToStringBuilder)
to fill in details about the instance.
toString
in class Object
extendDescription(ToStringBuilder)
public boolean isResetServiceEnabled()
isResetServiceEnabled
in interface IEngine
public abstract Collection getActivePageNames()
public Object getVisit()
If the visit is non-null then
the isDirty()
flag is set (because
the engine can't tell what the caller will
do with the visit).
getVisit
in interface IEngine
public Object getVisit(IRequestCycle cycle)
createVisit(IRequestCycle)
to create
it lazily if needed. If cycle is null, the visit will not be lazily created.
After creating the visit, but before returning,
the HttpSession
will be created, and
setStateful()
will be invoked.
Sets the isDirty()
flag, if the return value
is not null.
getVisit
in interface IEngine
public void setVisit(Object value)
dirty flag
.
setVisit
in interface IEngine
public boolean getHasVisit()
protected Object createVisit(IRequestCycle cycle)
getVisit(IRequestCycle)
). This implementation works
by looking up the name of the class to instantiate
in the configuration
.
Subclasses may want to overide this method if some other means of instantiating a visit object is required.
public Object getGlobal()
setupForRequest(RequestContext)
invokes
createGlobal(RequestContext)
if needed),
and is stored into the ServletContext
. All instances of the engine for
the application share
the global object; however, the global object is explicitly not
replicated to other servers within
a cluster.
getGlobal
in interface IEngine
public IScriptSource getScriptSource()
IEngine
IScript
s. The source is
shared between all sessions.
getScriptSource
in interface IEngine
public boolean isStateful()
IEngine
isStateful
in interface IEngine
protected void setStateful()
RequestContext
).
public ListenerMap getListeners()
protected void handleRedirectException(IRequestCycle cycle, RedirectException ex)
RedirectException
is thrown during the processing of a request.
ApplicationRuntimeException
- if an IOException
,
ServletException
is thrown by the redirect, or if no
RequestDispatcher
can be found for local resource.public IComponentMessagesSource getComponentMessagesSource()
IEngine
getComponentMessagesSource
in interface IEngine
createComponentStringsSource(RequestContext)
public DataSqueezer getDataSqueezer()
IEngine
DataSqueezer
.
getDataSqueezer
in interface IEngine
createDataSqueezer()
public DataSqueezer createDataSqueezer()
setupForRequest(RequestContext)
to create
a DataSqueezer
when needed (typically, just the very first time).
This implementation returns a standard, new instance.
protected String extractServiceName(RequestContext context)
service(RequestContext)
to extract, from the URL,
the name of the service. The current implementation expects the first
pathInfo element to be the service name. At some point in the future,
the method of constructing and parsing URLs may be abstracted into
a developer-selected class.
Subclasses may override this method if the application defines specific services with unusual URL encoding rules.
This implementation simply extracts the value for
query parameter Tapestry.SERVICE_QUERY_PARAMETER_NAME
and extracts the service name from that.
For supporting the JSP tags, this method first
checks for attribute Tapestry.TAG_SUPPORT_SERVICE_ATTRIBUTE
. If non-null,
then Tapestry.TAGSUPPORT_SERVICE
is returned.
public IPropertySource getPropertySource()
IEngine
IPropertySource
that should be
used to obtain configuration data. The returned source represents
a search path that includes (at a minimum):
ApplicationSpecification
web.xml
deployment descriptor)
web.xml
)
-D
JVM command line parameter)
getPropertySource
in interface IEngine
createPropertySource(RequestContext)
public ResourceChecksumSource getResourceChecksumSource()
IEngine
getResourceChecksumSource
in interface IEngine
protected String getExceptionPageName()
protected String getStaleLinkPageName()
protected String getStaleSessionPageName()
protected IPropertySource createPropertySource(RequestContext context)
If the application specification contains an extension named "org.apache.tapestry.property-source" it is inserted in the search path just before the property source for JVM System Properties. This is a simple hook at allow application-specific methods of obtaining configuration values (typically, from a database or from JMX, in some way). Alternately, subclasses may override this method to provide whatever search path is appropriate.
protected Object createGlobal(RequestContext context)
org.apache.tapestry.global-class
, and instantiates that class
using a no-arguments
constructor. If the property is not defined, a synchronized
HashMap
is created.
protected Pool createPool(RequestContext context)
Pool
, with the standard
set of adaptors, plus BSFManagerPoolableAdaptor
for
BSFManager
.
Subclasses may override this method to configure the Pool differently.
public Pool getPool()
IEngine
Pool
that is used
to store all manner of objects that are needed throughout the system.
This is the best way to deal with objects that are both expensive to
create and not threadsafe. The reset service
will clear out this Pool.
getPool
in interface IEngine
createPool(RequestContext)
protected IComponentClassEnhancer createComponentClassEnhancer(RequestContext context)
setupForRequest(RequestContext)
. Creates
a new instance of DefaultComponentClassEnhancer
. Subclasses
may override to return a different object.
Check the property org.apache.tapestry.enhance.disable-abstract-method-validation
and, if true, disables abstract method validation. This is used in some
errant JDK's (such as IBM's 1.3.1) that incorrectly report concrete methods from
abstract classes as abstract.
public IComponentClassEnhancer getComponentClassEnhancer()
IEngine
getComponentClassEnhancer
in interface IEngine
createComponentClassEnhancer(RequestContext)
public boolean isDirty()
HttpSession
. Various
events set this property to true.
protected void markDirty()
HttpSession
.
public void valueBound(HttpSessionBindingEvent arg0)
HttpSession
.
valueBound
in interface HttpSessionBindingListener
public void valueUnbound(HttpSessionBindingEvent arg0)
valueUnbound
in interface HttpSessionBindingListener
protected String getDefaultOutputEncoding()
public String getOutputEncoding()
getOutputEncoding
in interface IEngine
IEngine.getOutputEncoding()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |