Class TapestryHttpModule
- java.lang.Object
-
- org.apache.tapestry5.http.modules.TapestryHttpModule
-
public final class TapestryHttpModule extends java.lang.Object
The Tapestry module for HTTP handling classes.
-
-
Constructor Summary
Constructors Constructor Description TapestryHttpModule(PropertyShadowBuilder shadowBuilder, RequestGlobals requestGlobals, PipelineBuilder pipelineBuilder, ApplicationGlobals applicationGlobals)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidbind(ServiceBinder binder)ApplicationInitializerbuildApplicationInitializer(org.slf4j.Logger logger, java.util.List<ApplicationInitializerFilter> configuration)Initializes the application, using a pipeline ofApplicationInitializers.static HttpRequestBodyConverterbuildHttpRequestBodyConverter(java.util.List<HttpRequestBodyConverter> converters, ChainBuilder chainBuilder)HttpServletRequestbuildHttpServletRequest()Builds a shadow of the RequestGlobals.HTTPServletRequest property.HttpServletRequestHandlerbuildHttpServletRequestHandler(org.slf4j.Logger logger, java.util.List<HttpServletRequestFilter> configuration, RequestHandler handler, java.lang.String applicationCharset, TapestrySessionFactory sessionFactory)HttpServletResponsebuildHttpServletResponse()DispatcherbuildMasterDispatcher(java.util.List<Dispatcher> configuration, ChainBuilder chainBuilder)Ordered contributions to the MasterDispatcher service allow different URL matching strategies to occur.RequestbuildRequest(PropertyShadowBuilder shadowBuilder)Builds a shadow of the RequestGlobals.request property.RequestHandlerbuildRequestHandler(org.slf4j.Logger logger, java.util.List<RequestFilter> configuration, Dispatcher masterDispatcher)ResponsebuildResponse()Builds a shadow of the RequestGlobals.response property.ServletApplicationInitializerbuildServletApplicationInitializer(org.slf4j.Logger logger, java.util.List<ServletApplicationInitializerFilter> configuration, ApplicationInitializer initializer)SessionPersistedObjectAnalyzerbuildSessionPersistedObjectAnalyzer(java.util.Map<java.lang.Class,SessionPersistedObjectAnalyzer> configuration, StrategyBuilder strategyBuilder)The master SessionPersistedObjectAnalyzer.static voidcontributeCorsHttpServletRequestFilter(OrderedConfiguration<CorsHandler> configuration)static voidcontributeFactoryDefaults(MappedConfiguration<java.lang.String,java.lang.Object> configuration)Contributes factory defaults that may be overridden.static voidcontributeHttpRequestBodyConverter(OrderedConfiguration<HttpRequestBodyConverter> configuration)voidcontributeHttpServletRequestHandler(OrderedConfiguration<HttpServletRequestFilter> configuration, boolean gzipCompressionEnabled, boolean corsEnabled, CorsHttpServletRequestFilter corsHttpServletRequestFilter, GZipFilter gzipFilter)StoreIntoGlobals Stores the request and response intoRequestGlobalsat the start of the pipeline IgnoredPaths Identifies requests that are known (via the IgnoredPathsFilter service's configuration) to be mapped to other applications GZip Handles GZIP compression of response streams (if supported by client)static voidcontributeSessionPersistedObjectAnalyzer(MappedConfiguration<java.lang.Class,SessionPersistedObjectAnalyzer> configuration)Identifies String, Number and Boolean as immutable objects, a catch-all handler for Object (that understands theImmutableSessionPersistedObjectannotation), and a handler forOptimizedSessionPersistedObject.static voidcontributeTypeCoercer(MappedConfiguration<CoercionTuple.Key,CoercionTuple> configuration)
-
-
-
Constructor Detail
-
TapestryHttpModule
public TapestryHttpModule(PropertyShadowBuilder shadowBuilder, RequestGlobals requestGlobals, PipelineBuilder pipelineBuilder, ApplicationGlobals applicationGlobals)
-
-
Method Detail
-
bind
public static void bind(ServiceBinder binder)
-
contributeFactoryDefaults
public static void contributeFactoryDefaults(MappedConfiguration<java.lang.String,java.lang.Object> configuration)
Contributes factory defaults that may be overridden.
-
buildRequest
public Request buildRequest(PropertyShadowBuilder shadowBuilder)
Builds a shadow of the RequestGlobals.request property. Note again that the shadow can be an ordinary singleton, even though RequestGlobals is perthread.
-
buildHttpServletRequest
public HttpServletRequest buildHttpServletRequest()
Builds a shadow of the RequestGlobals.HTTPServletRequest property. Generally, you should inject theRequestservice instead, as future version of Tapestry may operate beyond just the servlet API.
-
buildHttpServletResponse
public HttpServletResponse buildHttpServletResponse()
- Since:
- 5.1.0.0
-
buildResponse
public Response buildResponse()
Builds a shadow of the RequestGlobals.response property. Note again that the shadow can be an ordinary singleton, even though RequestGlobals is perthread.
-
buildMasterDispatcher
@Marker(Primary.class) public Dispatcher buildMasterDispatcher(java.util.List<Dispatcher> configuration, ChainBuilder chainBuilder)
Ordered contributions to the MasterDispatcher service allow different URL matching strategies to occur.
-
buildSessionPersistedObjectAnalyzer
@Marker(Primary.class) public SessionPersistedObjectAnalyzer buildSessionPersistedObjectAnalyzer(java.util.Map<java.lang.Class,SessionPersistedObjectAnalyzer> configuration, StrategyBuilder strategyBuilder)
The master SessionPersistedObjectAnalyzer.- Since:
- 5.1.0.0
-
contributeSessionPersistedObjectAnalyzer
public static void contributeSessionPersistedObjectAnalyzer(MappedConfiguration<java.lang.Class,SessionPersistedObjectAnalyzer> configuration)
Identifies String, Number and Boolean as immutable objects, a catch-all handler for Object (that understands theImmutableSessionPersistedObjectannotation), and a handler forOptimizedSessionPersistedObject.- Since:
- 5.1.0.0
-
buildApplicationInitializer
@Marker(Primary.class) public ApplicationInitializer buildApplicationInitializer(org.slf4j.Logger logger, java.util.List<ApplicationInitializerFilter> configuration)
Initializes the application, using a pipeline ofApplicationInitializers.
-
buildHttpServletRequestHandler
public HttpServletRequestHandler buildHttpServletRequestHandler(org.slf4j.Logger logger, java.util.List<HttpServletRequestFilter> configuration, @Primary RequestHandler handler, @Symbol("tapestry.charset") java.lang.String applicationCharset, TapestrySessionFactory sessionFactory)
-
buildRequestHandler
@Marker(Primary.class) public RequestHandler buildRequestHandler(org.slf4j.Logger logger, java.util.List<RequestFilter> configuration, @Primary Dispatcher masterDispatcher)
-
buildServletApplicationInitializer
public ServletApplicationInitializer buildServletApplicationInitializer(org.slf4j.Logger logger, java.util.List<ServletApplicationInitializerFilter> configuration, @Primary ApplicationInitializer initializer)
-
contributeHttpServletRequestHandler
public void contributeHttpServletRequestHandler(OrderedConfiguration<HttpServletRequestFilter> configuration, @Symbol("tapestry.gzip-compression-enabled") boolean gzipCompressionEnabled, @Symbol("tapestry.cors-enabled") boolean corsEnabled, CorsHttpServletRequestFilter corsHttpServletRequestFilter, @Autobuild GZipFilter gzipFilter)
- StoreIntoGlobals
- Stores the request and response into
RequestGlobalsat the start of the pipeline - IgnoredPaths
- Identifies requests that are known (via the IgnoredPathsFilter service's configuration) to be mapped to other applications
- GZip
- Handles GZIP compression of response streams (if supported by client)
-
buildHttpRequestBodyConverter
public static HttpRequestBodyConverter buildHttpRequestBodyConverter(java.util.List<HttpRequestBodyConverter> converters, ChainBuilder chainBuilder)
-
contributeHttpRequestBodyConverter
public static void contributeHttpRequestBodyConverter(OrderedConfiguration<HttpRequestBodyConverter> configuration)
-
contributeTypeCoercer
public static void contributeTypeCoercer(MappedConfiguration<CoercionTuple.Key,CoercionTuple> configuration)
-
contributeCorsHttpServletRequestFilter
public static void contributeCorsHttpServletRequestFilter(OrderedConfiguration<CorsHandler> configuration)
-
-