org.springframework.web.socket.sockjs.transport.handler

## Class HtmlFileTransportHandler

- java.lang.Object
- - org.springframework.web.socket.sockjs.transport.handler.AbstractTransportHandler
  - - org.springframework.web.socket.sockjs.transport.handler.AbstractHttpSendingTransportHandler
    - - org.springframework.web.socket.sockjs.transport.handler.HtmlFileTransportHandler

- All Implemented Interfaces:
    SockJsSessionFactory, TransportHandler

      public class HtmlFileTransportHandler
      extends AbstractHttpSendingTransportHandler

  An HTTP `TransportHandler` that uses a famous browsder document.domain technique: http://stackoverflow.com/questions/1481251/what-does-document-domain-document-domain-do
  Since:
    4.0
  Author:
    Rossen Stoyanchev

- - ### Field Summary

    - ### Fields inherited from class org.springframework.web.socket.sockjs.transport.handler.AbstractTransportHandler

      `logger, UTF8_CHARSET`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HtmlFileTransportHandler()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `StreamingSockJsSession` | `createSession(String sessionId, WebSocketHandler handler, Map<String,Object> attributes)` Create a new SockJS session.
    `protected MediaType` | `getContentType()`
    `protected SockJsFrameFormat` | `getFrameFormat(ServerHttpRequest request)`
    `TransportType` | `getTransportType()` Return the transport type supported by this handler.
    `void` | `handleRequestInternal(ServerHttpRequest request, ServerHttpResponse response, AbstractHttpSockJsSession sockJsSession)`

    - ### Methods inherited from class org.springframework.web.socket.sockjs.transport.handler.AbstractHttpSendingTransportHandler

      `getCallbackParam, handleRequest`

    - ### Methods inherited from class org.springframework.web.socket.sockjs.transport.handler.AbstractTransportHandler

      `getServiceConfig, initialize`

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

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

- - ### Constructor Detail

    - #### HtmlFileTransportHandler

          public HtmlFileTransportHandler()

  - ### Method Detail

    - #### getTransportType

          public TransportType getTransportType()

      Description copied from interface: `TransportHandler`
      Return the transport type supported by this handler.

    - #### getContentType

          protected MediaType getContentType()

      Specified by:
        `getContentType` in class `AbstractHttpSendingTransportHandler`

    - #### createSession

          public StreamingSockJsSession createSession(String sessionId,
                                                      WebSocketHandler handler,
                                                      Map<String,Object> attributes)

      Description copied from interface: `SockJsSessionFactory`
      Create a new SockJS session.
      Parameters:
        `sessionId` - the ID of the session
        `handler` - the underlying `WebSocketHandler`
        `attributes` - handshake request specific attributes
      Returns:
        a new session, never `null`

    - #### handleRequestInternal

          public void handleRequestInternal(ServerHttpRequest request,
                                            ServerHttpResponse response,
                                            AbstractHttpSockJsSession sockJsSession)

      Overrides:
        `handleRequestInternal` in class `AbstractHttpSendingTransportHandler`

    - #### getFrameFormat

          protected SockJsFrameFormat getFrameFormat(ServerHttpRequest request)

      Specified by:
        `getFrameFormat` in class `AbstractHttpSendingTransportHandler`