StompSessionHandlerAdapter

Abstract adapter class for {@link StompSessionHandler} with mostly empty implementation methods except for {@link #getPayloadType} which returns string as the default Object type expected for STOMP ERROR frame payloads.

@author Rossen Stoyanchev @since 4.2

Members

Functions

afterConnected
void afterConnected(StompSession session, StompHeaders connectedHeaders)

This implementation is empty.

getPayloadType
TypeInfo getPayloadType(StompHeaders headers)

This implementation returns string as the expected payload type for STOMP ERROR frames.

handleException
void handleException(StompSession session, StompCommand command, StompHeaders headers, byte[] payload, Throwable exception)

This implementation is empty.

handleFrame
void handleFrame(StompHeaders headers, Object payload)

This implementation is empty.

handleTransportError
void handleTransportError(StompSession session, Throwable exception)

This implementation is empty.

Inherited Members

From StompSessionHandler

afterConnected
void afterConnected(StompSession session, StompHeaders connectedHeaders)

Invoked when the session is ready to use, i.e. after the underlying transport (TCP, WebSocket) is connected and a STOMP CONNECTED frame is received from the broker. @param session the client STOMP session @param connectedHeaders the STOMP CONNECTED frame headers

handleException
void handleException(StompSession session, StompCommand command, StompHeaders headers, byte[] payload, Throwable exception)

Handle any exception arising while processing a STOMP frame such as a failure to convert the payload or an unhandled exception in the application {@code StompFrameHandler}. @param session the client STOMP session @param command the STOMP command of the frame @param headers the headers @param payload the raw payload @param exception the exception

handleTransportError
void handleTransportError(StompSession session, Throwable exception)

Handle a low level transport error which could be an I/O error or a failure to encode or decode a STOMP message. <p>Note that {@link hunt.stomp.simp.stomp.ConnectionLostException ConnectionLostException} will be passed into this method when the connection is lost rather than closed normally via {@link StompSession#disconnect()}. @param session the client STOMP session @param exception the exception that occurred

Meta