Package org.apache.tapestry5.http.modules

## Class TapestryHttpModule

- java.lang.Object
- - org.apache.tapestry5.http.modules.TapestryHttpModule

-     public final class TapestryHttpModule
      extends 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, List<ApplicationInitializerFilter> configuration)` | Initializes the application, using a pipeline of `ApplicationInitializer`s.
    `HttpServletRequest` | `buildHttpServletRequest()` | Builds a shadow of the RequestGlobals.HTTPServletRequest property.
    `HttpServletRequestHandler` | `buildHttpServletRequestHandler​(org.slf4j.Logger logger, List<HttpServletRequestFilter> configuration, RequestHandler handler, String applicationCharset, TapestrySessionFactory sessionFactory)` |
    `HttpServletResponse` | `buildHttpServletResponse()` |
    `Dispatcher` | `buildMasterDispatcher​(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, List<RequestFilter> configuration, Dispatcher masterDispatcher)` |
    `Response` | `buildResponse()` | Builds a shadow of the RequestGlobals.response property.
    `ServletApplicationInitializer` | `buildServletApplicationInitializer​(org.slf4j.Logger logger, List<ServletApplicationInitializerFilter> configuration, ApplicationInitializer initializer)` |
    `SessionPersistedObjectAnalyzer` | `buildSessionPersistedObjectAnalyzer​(Map<Class,​SessionPersistedObjectAnalyzer> configuration, StrategyBuilder strategyBuilder)` | The master SessionPersistedObjectAnalyzer.
    `static void` | `contributeFactoryDefaults​(MappedConfiguration<String,​Object> configuration)` | Contributes factory defaults that may be overridden.
    `void` | `contributeHttpServletRequestHandler​(OrderedConfiguration<HttpServletRequestFilter> configuration, boolean gzipCompressionEnabled, 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)
    `static void` | `contributeSessionPersistedObjectAnalyzer​(MappedConfiguration<Class,​SessionPersistedObjectAnalyzer> configuration)` | Identifies String, Number and Boolean as immutable objects, a catch-all handler for Object (that understands the `ImmutableSessionPersistedObject` annotation), and a handler for `OptimizedSessionPersistedObject`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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<String,​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 the `Request` 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​(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 the `ImmutableSessionPersistedObject` annotation), and a handler for `OptimizedSessionPersistedObject`.
      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 of `ApplicationInitializer`s.

    - #### 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,
                                                          @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)