public class HtmlFileTransportHandler extends AbstractHttpSendingTransportHandler
TransportHandler
that uses a famous browsder document.domain technique:
http://stackoverflow.com/questions/1481251/what-does-document-domain-document-domain-doModifier and Type | Class and Description |
---|---|
private class |
HtmlFileTransportHandler.HtmlFileStreamingSockJsSession |
Modifier and Type | Field and Description |
---|---|
private static int |
MINIMUM_PARTIAL_HTML_CONTENT_LENGTH |
private static java.lang.String |
PARTIAL_HTML_CONTENT |
logger, UTF8_CHARSET
Constructor and Description |
---|
HtmlFileTransportHandler() |
Modifier and Type | Method and Description |
---|---|
StreamingSockJsSession |
createSession(java.lang.String sessionId,
WebSocketHandler handler,
java.util.Map<java.lang.String,java.lang.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) |
getCallbackParam, handleRequest
getServiceConfig, initialize
private static final java.lang.String PARTIAL_HTML_CONTENT
private static final int MINIMUM_PARTIAL_HTML_CONTENT_LENGTH
public TransportType getTransportType()
TransportHandler
protected MediaType getContentType()
getContentType
in class AbstractHttpSendingTransportHandler
public StreamingSockJsSession createSession(java.lang.String sessionId, WebSocketHandler handler, java.util.Map<java.lang.String,java.lang.Object> attributes)
SockJsSessionFactory
sessionId
- the ID of the sessionhandler
- the underlying WebSocketHandler
attributes
- handshake request specific attributesnull
public void handleRequestInternal(ServerHttpRequest request, ServerHttpResponse response, AbstractHttpSockJsSession sockJsSession)
handleRequestInternal
in class AbstractHttpSendingTransportHandler
protected SockJsFrameFormat getFrameFormat(ServerHttpRequest request)
getFrameFormat
in class AbstractHttpSendingTransportHandler