Miranda optSealedDispatch

From Erights

Jump to: navigation, search

__optSealedDispatch/1 is a Miranda message.


Signature: __optSealedDispatch(brand :Brand) :void

Generic object-level rights amplification protocol.

Dispatch on the brand much as one would dispatch on a message name. If we recognize the brand and we have the corresponding sealer, then we may return something meaningful inside a SealedBox sealed with that Sealer. If we have nothing to return, given the meaning we associate with that brand as a request, then we return null.

Something meaningful? Sounds strange. See [e-lang] Object coercion / adaptation and the surrounding thread for more on the rationale for the design of this method. Note that, at the time of that discussion, this method was named getOptMeta instead.

The default implementation: return null.

If this object isn't actually transparent, but if brand represents a party this object would like to reveal itself to (such as a serialization system implementing persistence for this object's subsystem), then this object can choose to return a SealedBox, sealed by the by the Sealer for that brand, containing the same triple that __optUncall would otherwise have returned. By so doing, the object reveals its internals only to someone having the corresponding Unsealer.

Personal tools
more tools