Class TapestryHttpModule
java.lang.Object
org.apache.tapestry5.http.modules.TapestryHttpModule
The Tapestry module for HTTP handling classes.
-
Constructor Summary
ConstructorsConstructorDescriptionTapestryHttpModule(PropertyShadowBuilder shadowBuilder, RequestGlobals requestGlobals, PipelineBuilder pipelineBuilder, ApplicationGlobals applicationGlobals) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbind(ServiceBinder binder) buildApplicationInitializer(org.slf4j.Logger logger, List<ApplicationInitializerFilter> configuration) Initializes the application, using a pipeline ofApplicationInitializers.static HttpRequestBodyConverterbuildHttpRequestBodyConverter(List<HttpRequestBodyConverter> converters, ChainBuilder chainBuilder) javax.servlet.http.HttpServletRequestBuilds a shadow of the RequestGlobals.HTTPServletRequest property.buildHttpServletRequestHandler(org.slf4j.Logger logger, List<HttpServletRequestFilter> configuration, RequestHandler handler, String applicationCharset, TapestrySessionFactory sessionFactory) javax.servlet.http.HttpServletResponsebuildMasterDispatcher(List<Dispatcher> configuration, ChainBuilder chainBuilder) Ordered contributions to the MasterDispatcher service allow different URL matching strategies to occur.buildRequest(PropertyShadowBuilder shadowBuilder) Builds a shadow of the RequestGlobals.request property.buildRequestHandler(org.slf4j.Logger logger, List<RequestFilter> configuration, Dispatcher masterDispatcher) Builds a shadow of the RequestGlobals.response property.buildServletApplicationInitializer(org.slf4j.Logger logger, List<ServletApplicationInitializerFilter> configuration, ApplicationInitializer initializer) buildSessionPersistedObjectAnalyzer(Map<Class, SessionPersistedObjectAnalyzer> configuration, StrategyBuilder strategyBuilder) The master SessionPersistedObjectAnalyzer.static voidcontributeCorsHttpServletRequestFilter(OrderedConfiguration<CorsHandler> configuration) static voidcontributeFactoryDefaults(MappedConfiguration<String, Object> configuration) Contributes factory defaults that may be overridden.static voidvoidcontributeHttpServletRequestHandler(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<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 Details
-
TapestryHttpModule
public TapestryHttpModule(PropertyShadowBuilder shadowBuilder, RequestGlobals requestGlobals, PipelineBuilder pipelineBuilder, ApplicationGlobals applicationGlobals)
-
-
Method Details
-
bind
-
contributeFactoryDefaults
Contributes factory defaults that may be overridden. -
buildRequest
Builds a shadow of the RequestGlobals.request property. Note again that the shadow can be an ordinary singleton, even though RequestGlobals is perthread. -
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
- Since:
- 5.1.0.0
-
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(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(Map<Class, SessionPersistedObjectAnalyzer> configuration, StrategyBuilder strategyBuilder) The master SessionPersistedObjectAnalyzer.- Since:
- 5.1.0.0
-
contributeSessionPersistedObjectAnalyzer
public static void contributeSessionPersistedObjectAnalyzer(MappedConfiguration<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, List<ApplicationInitializerFilter> configuration) Initializes the application, using a pipeline ofApplicationInitializers. -
buildHttpServletRequestHandler
public HttpServletRequestHandler buildHttpServletRequestHandler(org.slf4j.Logger logger, List<HttpServletRequestFilter> configuration, @Primary RequestHandler handler, @Symbol("tapestry.charset") String applicationCharset, TapestrySessionFactory sessionFactory) -
buildRequestHandler
@Marker(Primary.class) public RequestHandler buildRequestHandler(org.slf4j.Logger logger, List<RequestFilter> configuration, @Primary Dispatcher masterDispatcher) -
buildServletApplicationInitializer
public ServletApplicationInitializer buildServletApplicationInitializer(org.slf4j.Logger logger, 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(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)
-