Class StompSessionHandlerAdapter
java.lang.Object
org.springframework.messaging.simp.stomp.StompSessionHandlerAdapter
- All Implemented Interfaces:
StompFrameHandler
,StompSessionHandler
Abstract adapter class for
StompSessionHandler
with mostly empty
implementation methods except for getPayloadType(org.springframework.messaging.simp.stomp.StompHeaders)
which returns String
as the default Object type expected for STOMP ERROR frame payloads.- Since:
- 4.2
- Author:
- Rossen Stoyanchev
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterConnected
(StompSession session, StompHeaders connectedHeaders) This implementation is empty.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.
-
Constructor Details
-
StompSessionHandlerAdapter
public StompSessionHandlerAdapter()
-
-
Method Details
-
getPayloadType
This implementation returns String as the expected payload type for STOMP ERROR frames.- Specified by:
getPayloadType
in interfaceStompFrameHandler
- Parameters:
headers
- the headers of a message
-
handleFrame
This implementation is empty.- Specified by:
handleFrame
in interfaceStompFrameHandler
- Parameters:
headers
- the headers of the framepayload
- the payload, ornull
if there was no payload
-
afterConnected
This implementation is empty.- Specified by:
afterConnected
in interfaceStompSessionHandler
- Parameters:
session
- the client STOMP sessionconnectedHeaders
- the STOMP CONNECTED frame headers
-
handleException
public void handleException(StompSession session, @Nullable StompCommand command, StompHeaders headers, byte[] payload, Throwable exception) This implementation is empty.- Specified by:
handleException
in interfaceStompSessionHandler
- Parameters:
session
- the client STOMP sessioncommand
- the STOMP command of the frameheaders
- the headerspayload
- the raw payloadexception
- the exception
-
handleTransportError
This implementation is empty.- Specified by:
handleTransportError
in interfaceStompSessionHandler
- Parameters:
session
- the client STOMP sessionexception
- the exception that occurred
-