public interface TextFormatMessageHandler
Interface for the mode to configure
TextFormatProcessor for handling TextFormatMessages.-
Method Summary
Modifier and TypeMethodDescriptiondefault TextFormatMessagehandle(TextFormatMessage message) Method to allow custom handling or even transformation ofTextFormatMessages.
-
Method Details
-
handle
Method to allow custom handling or even transformation ofTextFormatMessages. Does nothing by default and may be overridden e.g. to log messages and throw aRuntimeExceptionin case of anerror.- Parameters:
message- theTextFormatMessageto handle.- Returns:
- the given
TextFormatMessageor potentially a transformation. - Throws:
RuntimeException- in case theTextFormatMessageshould immediately lead to an exception aborting any further processing. By defaultTextFormatMessages should be collected inTextFormatProcessor.getMessages()in order to allow maximum fault-tolerance.
-