Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JGRP-2850 Please make MessageFactory static #861

Closed

Conversation

cfredri4
Copy link
Contributor

@cfredri4 cfredri4 commented Nov 7, 2024

This change makes MessageFactory into a static class similar to ClassConfigurator. This greatly simplifies adding custom message types, and also allows custom types to be used in Batch/CompositeMessage which otherwise only allows the default types. This comes with the side effect that it's no longer possible to change how the default message types are generated, but this must be a much less common use case than registering custom types. And as a workaround, a new custom type can be registered instead of altering the default types.

This change makes MessageFactory into a static class similar to ClassConfigurator. This greatly simplifies adding custom message types, and also allows custom types to be used in Batch/CompositeMessag which otherwise only allows the default types.
This comes with the side effect that it's no longer possible to change how the default message types are generated, but this must be a much less common use case than registering custom types. And as a workaround, a new custom type can be registered instead of altering the default types.
@cfredri4 cfredri4 changed the title Make MessageFactory static JGRP-2850 Please make MessageFactory static Nov 7, 2024
@belaban
Copy link
Owner

belaban commented Nov 14, 2024

Makes a lot of sense; great simplification, too. Thanks!

@belaban belaban closed this Nov 14, 2024
@cfredri4 cfredri4 deleted the make-message-factory-static branch November 14, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants