Annotation Interface LocalOnly
@Documented
@Target({TYPE,ANNOTATION_TYPE,PACKAGE})
@Retention(RUNTIME)
@Inherited
public @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 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
-