org.springframework.messaging.simp.stomp

## Interface StompFrameHandler

- All Known Subinterfaces:
    StompSessionHandler
  All Known Implementing Classes:
    StompSessionHandlerAdapter

      public interface StompFrameHandler

  Contract to handle a STOMP frame.
  Since:
    4.2
  Author:
    Rossen Stoyanchev

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Type` | `getPayloadType(StompHeaders headers)` Invoked before `handleFrame(StompHeaders, Object)` to determine the type of Object the payload should be converted to.
    `void` | `handleFrame(StompHeaders headers, Object payload)` Handle a STOMP frame with the payload converted to the target type returned from `getPayloadType(StompHeaders)`.

- - ### Method Detail

    - #### getPayloadType

          Type getPayloadType(StompHeaders headers)

      Invoked before `handleFrame(StompHeaders, Object)` to determine the type of Object the payload should be converted to.
      Parameters:
        `headers` - the headers of a message

    - #### handleFrame

          void handleFrame(StompHeaders headers,
                           @Nullable
                           Object payload)

      Handle a STOMP frame with the payload converted to the target type returned from `getPayloadType(StompHeaders)`.
      Parameters:
        `headers` - the headers of the frame
        `payload` - the payload, or `null` if there was no payload