eclipse-uprotocol / up-java

uProtocol Language Specific Library for Java
Apache License 2.0
8 stars 14 forks source link

Make UMessageBuilder immutable #154

Closed tamarafischer closed 2 months ago

tamarafischer commented 2 months ago

UMessageBuilder should not hold data and actually can be an interface with static methods - that it actually has. UMessageBuilder should have static methods that return an immutable object

stevenhartley commented 2 months ago

If its an interface with static methods, how can I set the optional attributes and add the withXXX() APIs?

stevenhartley commented 2 months ago

Per offline conversation we already support the intention by using UMessage that is immutable in the L1 API