Annotation Interface LocalOnly


Restricts messages with the annotated payload type to local handlers.

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.

See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether messages in this scope are restricted to local handlers.
  • Element Details

    • value

      boolean value
      Whether messages in this scope are restricted to local handlers.
      Returns:
      true to require local-only dispatch
      Default:
      true