This section documents the runtime invocation of services that nodes bound within an event processor implement using
Fluxtion.
Three steps to using Fluxtion
1 - Create user classes implement an interface, mark the interface with @ExportService annotation
2 - Build the event processor using fluxtion compiler utility
3 - Integrate the event processor in the app and feed it events
Exporting a service interface from a bound class is supported. The generated event processor implements the interface and
routes calls to bound instances exporting the interface. The normal dispatch rules apply child instances receive trigger
callbacks on a change notification. Steps to export a service
Create the interface
Implement the interface in a bound class
Mark the interface to export with an @ExportService annotation
Lookup the interface on the container using <T> serviceT = processor.getExportedService()
The methods on an exported service must either be a boolean or void return type. The return value is used to notify
a signal change, void is equivalent to returning true. Depending upon the return value the event processor the event
processor then notifies annotated callback methods according to the dispatch rules.
Examples
The source project for the examples can be found here
Simple service export
Export a single implemented service, only annotated interfaces are exported at the event processor level. The serivce
reference is discovered with a call to the event processor instance, MyService myService = processor.getExportedService();
Output
No propagate service methods
An individual exported method can prevent a triggering a notification by adding @NoPropagateFunction to an interface
method
Output
No propagate service
An entire service can be marked with the @ExportService(propagate = false) resulting in all methods on the interface
swallowing event notifications