Annotation Interface LocalOnly
The annotation may be placed on a payload type, a meta-annotation, or a package. Package declarations apply to
child packages; use @LocalOnly(false) on a more specific package or payload type to opt out. A marked
original remains local-only when a dispatch interceptor replaces its payload, while a marked replacement also
enables the restriction.
Fluxzero never serializes or publishes a local-only message externally. A request without a matching local
handler completes exceptionally with LocalOnlyDispatchException; a non-request message without a matching
handler simply completes. Handler code can still perform its own side effects.
This annotation does not register a handler. Automatic Model apply handling remains tracked; an intentional
local Model mutation needs a real local handler, such as a payload @HandleCommand method invoking
Fluxzero.assertAndApply(this). Synchronous test fixtures preserve this boundary.
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanWhether messages in this scope are restricted to local handlers.
-
Element Details
-
value
boolean valueWhether messages in this scope are restricted to local handlers.- Returns:
trueto require local-only dispatch
- Default:
true
-