类 AbstractHttpSendingTransportHandler
- java.lang.Object
- org.springframework.web.socket.sockjs.transport.handler.AbstractTransportHandler
- org.springframework.web.socket.sockjs.transport.handler.AbstractHttpSendingTransportHandler
- 所有已实现的接口:
SockJsSessionFactory
,TransportHandler
- 直接已知子类:
EventSourceTransportHandler
,HtmlFileTransportHandler
,JsonpPollingTransportHandler
,XhrPollingTransportHandler
,XhrStreamingTransportHandler
public abstract class AbstractHttpSendingTransportHandler extends AbstractTransportHandler implements SockJsSessionFactory
Base class for HTTP transport handlers that push messages to connected clients.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
字段概要
从类继承的字段 org.springframework.web.socket.sockjs.transport.handler.AbstractTransportHandler
logger, UTF8_CHARSET
构造器概要
构造器 构造器 说明 AbstractHttpSendingTransportHandler()
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 protected String
getCallbackParam(ServerHttpRequest request)
protected abstract MediaType
getContentType()
protected abstract SockJsFrameFormat
getFrameFormat(ServerHttpRequest request)
void
handleRequest(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, SockJsSession wsSession)
Handle the given request and delegate messages to the providedWebSocketHandler
.protected void
handleRequestInternal(ServerHttpRequest request, ServerHttpResponse response, AbstractHttpSockJsSession sockJsSession)
从类继承的方法 org.springframework.web.socket.sockjs.transport.handler.AbstractTransportHandler
getServiceConfig, initialize
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 org.springframework.web.socket.sockjs.transport.SockJsSessionFactory
createSession
从接口继承的方法 org.springframework.web.socket.sockjs.transport.TransportHandler
checkSessionType, getTransportType
构造器详细资料
AbstractHttpSendingTransportHandler
public AbstractHttpSendingTransportHandler()
方法详细资料
handleRequest
public final void handleRequest(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, SockJsSession wsSession) throws SockJsException
从接口复制的说明:TransportHandler
Handle the given request and delegate messages to the providedWebSocketHandler
.- 指定者:
handleRequest
在接口中TransportHandler
- 参数:
request
- the current requestresponse
- the current responsewsHandler
- the target WebSocketHandler (nevernull
)wsSession
- the SockJS session (nevernull
)- 抛出:
SockJsException
- raised when request processing fails as explained inSockJsService
handleRequestInternal
protected void handleRequestInternal(ServerHttpRequest request, ServerHttpResponse response, AbstractHttpSockJsSession sockJsSession) throws SockJsException
getContentType
protected abstract MediaType getContentType()
getFrameFormat
protected abstract SockJsFrameFormat getFrameFormat(ServerHttpRequest request)
getCallbackParam
protected final String getCallbackParam(ServerHttpRequest request)