Given two different durable object classes DOA and DOB, and a third DOC. DOA and DOB share a common
Given two different durable object classes DOA and DOB, and a third DOC.
DOA and DOB share a common interface via a method (let's say receiveEvent), otherwise are different.
DOC only cares about that interface and wants to store references to the objects in a list and call the receiveEvent method on them.
It seems to me this isn't particularly straightforward because classes are tied to namespaces.
The references stored in the list would have to be ID + namespace identifier, and because namespaces are objects I will require some mapping somewhere i.e. "MY_NAMESPACE_STRING" -> env.MY_NAMESPACE
DOA and DOB share a common interface via a method (let's say receiveEvent), otherwise are different.
DOC only cares about that interface and wants to store references to the objects in a list and call the receiveEvent method on them.
It seems to me this isn't particularly straightforward because classes are tied to namespaces.
The references stored in the list would have to be ID + namespace identifier, and because namespaces are objects I will require some mapping somewhere i.e. "MY_NAMESPACE_STRING" -> env.MY_NAMESPACE
