Interface MessageConverterHelper
public interface MessageConverterHelper
- Author:
- Oleg Zhurakousky
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidpostProcessBatchMessageOnFailure(org.springframework.messaging.Message<?> message, int index) This method will be called by the framework in cases when a single message within batch of messages failed to convert.default booleanshouldFailIfCantConvert(org.springframework.messaging.Message<?> message) This method will be called by the framework in cases when a message failed to convert.default booleanshouldFailIfCantConvert(org.springframework.messaging.Message<?> message, Throwable t) This method will be called by the framework in cases when a message failed to convert.
-
Method Details
-
shouldFailIfCantConvert
default boolean shouldFailIfCantConvert(org.springframework.messaging.Message<?> message) This method will be called by the framework in cases when a message failed to convert. It allows you to signal to the framework if such failure should be considered fatal or not.- Parameters:
message- failed message- Returns:
- true if conversion failure must be considered fatal.
-
shouldFailIfCantConvert
default boolean shouldFailIfCantConvert(org.springframework.messaging.Message<?> message, Throwable t) This method will be called by the framework in cases when a message failed to convert. It allows you to signal to the framework if such failure should be considered fatal or not.- Parameters:
message- failed messaget- exception (coudl be null)- Returns:
- true if conversion failure must be considered fatal.
-
postProcessBatchMessageOnFailure
default void postProcessBatchMessageOnFailure(org.springframework.messaging.Message<?> message, int index) This method will be called by the framework in cases when a single message within batch of messages failed to convert. It provides a place for providing post-processing logic before message converter returns.- Parameters:
message- failed message.index- index of failed message within the batch
-