org.apache.tapestry5.tutorial.services
Class AppModule

java.lang.Object
  extended by org.apache.tapestry5.tutorial.services.AppModule

public class AppModule
extends java.lang.Object

This module is automatically included as part of the Tapestry IoC Registry, it's a good place to configure and extend Tapestry, or to place your own services.


Constructor Summary
AppModule()
           
 
Method Summary
 RequestFilter buildTimingFilter(org.slf4j.Logger logger)
          This is a service definition, the service will be named TimingFilter.
static void contributeApplicationDefaults(MappedConfiguration<java.lang.String,java.lang.String> configuration)
           
 void contributeRequestHandler(OrderedConfiguration<RequestFilter> configuration, RequestFilter filter)
          This is a contribution to the RequestHandler service configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppModule

public AppModule()
Method Detail

contributeApplicationDefaults

public static void contributeApplicationDefaults(MappedConfiguration<java.lang.String,java.lang.String> configuration)

buildTimingFilter

public RequestFilter buildTimingFilter(org.slf4j.Logger logger)
This is a service definition, the service will be named TimingFilter. The interface, RequestFilter, is used within the RequestHandler service pipeline, which is built from the RequestHandler service configuration. Tapestry IoC is responsible for passing in an appropriate Log instance. Requests for static resources are handled at a higher level, so this filter will only be invoked for Tapestry related requests.


contributeRequestHandler

public void contributeRequestHandler(OrderedConfiguration<RequestFilter> configuration,
                                     @Local
                                     RequestFilter filter)
This is a contribution to the RequestHandler service configuration. This is how we extend Tapestry using the timing filter. A common use for this kind of filter is transaction management or security.



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