Created
November 29, 2023 09:13
-
-
Save vladdedita/42f251d207f8ad02a96e3478ac4dabdb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Service | |
public class MessageProcessingService { | |
private final MessageProcessor<TextMessage> textMessageProcessor; | |
private final MessageProcessor<ImageMessage> imageMessageProcessor; | |
@Autowired | |
public MessageProcessingService(MessageProcessor<TextMessage> textMessageProcessor, | |
MessageProcessor<ImageMessage> imageMessageProcessor) { | |
this.textMessageProcessor = textMessageProcessor; | |
this.imageMessageProcessor = imageMessageProcessor; | |
} | |
public void processMessage(Object message) { | |
//Custom processing logic | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment