类 StompSessionHandlerAdapter
- java.lang.Object
- org.springframework.messaging.simp.stomp.StompSessionHandlerAdapter
- 所有已实现的接口:
StompFrameHandler
,StompSessionHandler
public abstract class StompSessionHandlerAdapter extends Object implements StompSessionHandler
Abstract adapter class forStompSessionHandler
with mostly empty implementation methods except forgetPayloadType(org.springframework.messaging.simp.stomp.StompHeaders)
which returns String as the default Object type expected for STOMP ERROR frame payloads.- 从以下版本开始:
- 4.2
- 作者:
- Rossen Stoyanchev
构造器概要
构造器 构造器 说明 StompSessionHandlerAdapter()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
afterConnected(StompSession session, StompHeaders connectedHeaders)
This implementation is empty.Type
getPayloadType(StompHeaders headers)
This implementation returns String as the expected payload type for STOMP ERROR frames.void
handleException(StompSession session, StompCommand command, StompHeaders headers, byte[] payload, Throwable exception)
This implementation is empty.void
handleFrame(StompHeaders headers, Object payload)
This implementation is empty.void
handleTransportError(StompSession session, Throwable exception)
This implementation is empty.
构造器详细资料
StompSessionHandlerAdapter
public StompSessionHandlerAdapter()
方法详细资料
afterConnected
public void afterConnected(StompSession session, StompHeaders connectedHeaders)
This implementation is empty.- 指定者:
afterConnected
在接口中StompSessionHandler
- 参数:
session
- the client STOMP sessionconnectedHeaders
- the STOMP CONNECTED frame headers
getPayloadType
public Type getPayloadType(StompHeaders headers)
This implementation returns String as the expected payload type for STOMP ERROR frames.- 指定者:
getPayloadType
在接口中StompFrameHandler
- 参数:
headers
- the headers of a message
handleFrame
public void handleFrame(StompHeaders headers, Object payload)
This implementation is empty.- 指定者:
handleFrame
在接口中StompFrameHandler
- 参数:
headers
- the headers of the framepayload
- the payload ornull
if there was no payload
handleException
public void handleException(StompSession session, StompCommand command, StompHeaders headers, byte[] payload, Throwable exception)
This implementation is empty.- 指定者:
handleException
在接口中StompSessionHandler
- 参数:
session
- the client STOMP sessioncommand
- the STOMP command of the frameheaders
- the headerspayload
- the raw payloadexception
- the exception
handleTransportError
public void handleTransportError(StompSession session, Throwable exception)
This implementation is empty.- 指定者:
handleTransportError
在接口中StompSessionHandler
- 参数:
session
- the client STOMP sessionexception
- the exception that occurred