Class AbstractHttpSendingTransportHandler
java.lang.Object
org.springframework.web.socket.sockjs.transport.handler.AbstractTransportHandler
org.springframework.web.socket.sockjs.transport.handler.AbstractHttpSendingTransportHandler
- All Implemented Interfaces:
SockJsSessionFactory,TransportHandler
- Direct Known Subclasses:
EventSourceTransportHandler,HtmlFileTransportHandler,XhrPollingTransportHandler,XhrStreamingTransportHandler
public abstract class AbstractHttpSendingTransportHandler
extends AbstractTransportHandler
implements SockJsSessionFactory
Base class for HTTP transport handlers that push messages to connected clients.
- Since:
- 4.0
- Author:
- Rossen Stoyanchev
-
Field Summary
Fields inherited from class org.springframework.web.socket.sockjs.transport.handler.AbstractTransportHandler
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final StringgetCallbackParam(ServerHttpRequest request) protected abstract MediaTypeprotected abstract SockJsFrameFormatgetFrameFormat(ServerHttpRequest request) final voidhandleRequest(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, SockJsSession wsSession) Handle the given request and delegate messages to the providedWebSocketHandler.protected voidhandleRequestInternal(ServerHttpRequest request, ServerHttpResponse response, AbstractHttpSockJsSession sockJsSession) Methods inherited from class org.springframework.web.socket.sockjs.transport.handler.AbstractTransportHandler
getServiceConfig, initializeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.web.socket.sockjs.transport.SockJsSessionFactory
createSessionMethods inherited from interface org.springframework.web.socket.sockjs.transport.TransportHandler
checkSessionType, getTransportType
-
Constructor Details
-
AbstractHttpSendingTransportHandler
public AbstractHttpSendingTransportHandler()
-
-
Method Details
-
handleRequest
public final void handleRequest(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, SockJsSession wsSession) throws SockJsException Description copied from interface:TransportHandlerHandle the given request and delegate messages to the providedWebSocketHandler.- Specified by:
handleRequestin interfaceTransportHandler- Parameters:
request- the current requestresponse- the current responsewsHandler- the target WebSocketHandler (nevernull)wsSession- the SockJS session (nevernull)- Throws:
SockJsException- raised when request processing fails as explained inSockJsService
-
handleRequestInternal
protected void handleRequestInternal(ServerHttpRequest request, ServerHttpResponse response, AbstractHttpSockJsSession sockJsSession) throws SockJsException - Throws:
SockJsException
-
getContentType
-
getFrameFormat
-
getCallbackParam
-