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 void
bind(ServiceBinder binder)
ApplicationInitializer
buildApplicationInitializer(org.slf4j.Logger logger, java.util.List<ApplicationInitializerFilter> configuration)
Initializes the application, using a pipeline ofApplicationInitializer
s.static HttpRequestBodyConverter
buildHttpRequestBodyConverter(java.util.List<HttpRequestBodyConverter> converters, ChainBuilder chainBuilder)
HttpServletRequest
buildHttpServletRequest()
Builds a shadow of the RequestGlobals.HTTPServletRequest property.HttpServletRequestHandler
buildHttpServletRequestHandler(org.slf4j.Logger logger, java.util.List<HttpServletRequestFilter> configuration, RequestHandler handler, java.lang.String applicationCharset, TapestrySessionFactory sessionFactory)
HttpServletResponse
buildHttpServletResponse()
Dispatcher
buildMasterDispatcher(java.util.List<Dispatcher> configuration, ChainBuilder chainBuilder)
Ordered contributions to the MasterDispatcher service allow different URL matching strategies to occur.Request
buildRequest(PropertyShadowBuilder shadowBuilder)
Builds a shadow of the RequestGlobals.request property.RequestHandler
buildRequestHandler(org.slf4j.Logger logger, java.util.List<RequestFilter> configuration, Dispatcher masterDispatcher)
Response
buildResponse()
Builds a shadow of the RequestGlobals.response property.ServletApplicationInitializer
buildServletApplicationInitializer(org.slf4j.Logger logger, java.util.List<ServletApplicationInitializerFilter> configuration, ApplicationInitializer initializer)
SessionPersistedObjectAnalyzer
buildSessionPersistedObjectAnalyzer(java.util.Map<java.lang.Class,SessionPersistedObjectAnalyzer> configuration, StrategyBuilder strategyBuilder)
The master SessionPersistedObjectAnalyzer.static void
contributeCorsHttpServletRequestFilter(OrderedConfiguration<CorsHandler> configuration)
static void
contributeFactoryDefaults(MappedConfiguration<java.lang.String,java.lang.Object> configuration)
Contributes factory defaults that may be overridden.static void
contributeHttpRequestBodyConverter(OrderedConfiguration<HttpRequestBodyConverter> configuration)
void
contributeHttpServletRequestHandler(OrderedConfiguration<HttpServletRequestFilter> configuration, boolean gzipCompressionEnabled, boolean corsEnabled, CorsHttpServletRequestFilter corsHttpServletRequestFilter, GZipFilter gzipFilter)
StoreIntoGlobals Stores the request and response intoRequestGlobals
at 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 void
contributeSessionPersistedObjectAnalyzer(MappedConfiguration<java.lang.Class,SessionPersistedObjectAnalyzer> configuration)
Identifies String, Number and Boolean as immutable objects, a catch-all handler for Object (that understands theImmutableSessionPersistedObject
annotation), and a handler forOptimizedSessionPersistedObject
.static void
contributeTypeCoercer(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 theRequest
service 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 theImmutableSessionPersistedObject
annotation), 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 ofApplicationInitializer
s.
-
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
RequestGlobals
at 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)
-
-