public abstract class StompSessionHandlerAdapter extends java.lang.Object implements StompSessionHandler
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.| Constructor and Description |
|---|
StompSessionHandlerAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterConnected(StompSession session,
StompHeaders connectedHeaders)
This implementation is empty.
|
java.lang.reflect.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,
java.lang.Throwable exception)
This implementation is empty.
|
void |
handleFrame(StompHeaders headers,
java.lang.Object payload)
This implementation is empty.
|
void |
handleTransportError(StompSession session,
java.lang.Throwable exception)
This implementation is empty.
|
public java.lang.reflect.Type getPayloadType(StompHeaders headers)
getPayloadType in interface StompFrameHandlerheaders - the headers of a messagepublic void handleFrame(StompHeaders headers, @Nullable java.lang.Object payload)
handleFrame in interface StompFrameHandlerheaders - the headers of the framepayload - the payload, or null if there was no payloadpublic void afterConnected(StompSession session, StompHeaders connectedHeaders)
afterConnected in interface StompSessionHandlersession - the client STOMP sessionconnectedHeaders - the STOMP CONNECTED frame headerspublic void handleException(StompSession session, @Nullable StompCommand command, StompHeaders headers, byte[] payload, java.lang.Throwable exception)
handleException in interface StompSessionHandlersession - the client STOMP sessioncommand - the STOMP command of the frameheaders - the headerspayload - the raw payloadexception - the exceptionpublic void handleTransportError(StompSession session, java.lang.Throwable exception)
handleTransportError in interface StompSessionHandlersession - the client STOMP sessionexception - the exception that occurred