org.springframework.messaging.simp.stomp

## 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 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

Constructors
Constructor and Description
`StompSessionHandlerAdapter()`

### Method Summary

All Methods Instance Methods Concrete Methods
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### StompSessionHandlerAdapter

    public StompSessionHandlerAdapter()

### Method Detail

#### getPayloadType

    public Type getPayloadType(StompHeaders headers)

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

Specified by:
  `getPayloadType` in interface `StompFrameHandler`
Parameters:
  `headers` - the headers of a message

#### handleFrame

    public void handleFrame(StompHeaders headers,
                            @Nullable
                            Object payload)

This implementation is empty.

Specified by:
  `handleFrame` in interface `StompFrameHandler`
Parameters:
  `headers` - the headers of the frame
  `payload` - the payload, or `null` if there was no payload

#### afterConnected

    public void afterConnected(StompSession session,
                               StompHeaders connectedHeaders)

This implementation is empty.

Specified by:
  `afterConnected` in interface `StompSessionHandler`
Parameters:
  `session` - the client STOMP session
  `connectedHeaders` - 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 interface `StompSessionHandler`
Parameters:
  `session` - the client STOMP session
  `command` - the STOMP command of the frame
  `headers` - the headers
  `payload` - the raw payload
  `exception` - the exception

#### handleTransportError

    public void handleTransportError(StompSession session,
                                     Throwable exception)

This implementation is empty.

Specified by:
  `handleTransportError` in interface `StompSessionHandler`
Parameters:
  `session` - the client STOMP session
  `exception` - the exception that occurred