P - the message payload typepublic interface SubProtocolErrorHandler<P>
| Modifier and Type | Method and Description |
|---|---|
org.springframework.messaging.Message<P> |
handleClientMessageProcessingError(org.springframework.messaging.Message<P> clientMessage,
Throwable ex)
Handle errors thrown while processing client messages providing an
opportunity to prepare the error message or to prevent one from being sent.
|
org.springframework.messaging.Message<P> |
handleErrorMessageToClient(org.springframework.messaging.Message<P> errorMessage)
Handle errors sent from the server side to clients, e.g.
|
@Nullable org.springframework.messaging.Message<P> handleClientMessageProcessingError(@Nullable org.springframework.messaging.Message<P> clientMessage, Throwable ex)
Note that the STOMP protocol requires a server to close the connection
after sending an ERROR frame. To prevent an ERROR frame from being sent,
a handler could return null and send a notification message
through the broker instead, e.g. via a user destination.
clientMessage - the client message related to the error, possibly
null if error occurred while parsing a WebSocket messageex - the cause for the error, never nullnull in which
case no message will be sent.@Nullable org.springframework.messaging.Message<P> handleErrorMessageToClient(org.springframework.messaging.Message<P> errorMessage)
"broke relay" because connectivity failed or the external broker sent an
error message, etc.errorMessage - the error message, never nullnull in which
case no message will be sent.