Class StompSessionHandlerAdapter
- java.lang.Object
 - org.springframework.messaging.simp.stomp.StompSessionHandlerAdapter
 
- All Implemented Interfaces:
 StompFrameHandler,StompSessionHandler
public abstract class StompSessionHandlerAdapter extends Object implements StompSessionHandler
Abstract adapter class forStompSessionHandlerwith 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.- Since:
 - 4.2
 - Author:
 - Rossen Stoyanchev
 
Constructor Summary
Constructors Constructor Description StompSessionHandlerAdapter()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterConnected(StompSession session, StompHeaders connectedHeaders)This implementation is empty.TypegetPayloadType(StompHeaders headers)This implementation returns String as the expected payload type for STOMP ERROR frames.voidhandleException(StompSession session, StompCommand command, StompHeaders headers, byte[] payload, Throwable exception)This implementation is empty.voidhandleFrame(StompHeaders headers, Object payload)This implementation is empty.voidhandleTransportError(StompSession session, Throwable exception)This implementation is empty.
Constructor Detail
StompSessionHandlerAdapter
public StompSessionHandlerAdapter()
Method Detail
afterConnected
public void afterConnected(StompSession session, StompHeaders connectedHeaders)
This implementation is empty.- Specified by:
 afterConnectedin interfaceStompSessionHandler- Parameters:
 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.- Specified by:
 getPayloadTypein interfaceStompFrameHandler- Parameters:
 headers- the headers of a message
handleFrame
public void handleFrame(StompHeaders headers, Object payload)
This implementation is empty.- Specified by:
 handleFramein interfaceStompFrameHandler- Parameters:
 headers- the headers of the framepayload- the payload ornullif there was no payload
handleException
public void handleException(StompSession session, StompCommand command, StompHeaders headers, byte[] payload, Throwable exception)
This implementation is empty.- Specified by:
 handleExceptionin interfaceStompSessionHandler- Parameters:
 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.- Specified by:
 handleTransportErrorin interfaceStompSessionHandler- Parameters:
 session- the client STOMP sessionexception- the exception that occurred