Interface PluginEventSubscriptions
public interface PluginEventSubscriptions
The only supported way for plugin code to subscribe to host events. Plugin beans
@Autowired this instead of the host's raw event bus - subscriptions made by bypassing
it (using the host bus directly) are against the plugin-author contract and are
not cleaned up automatically on plugin teardown; they will leak.-
Method Summary
Modifier and TypeMethodDescriptionSubscribeshandlerto every published event assignable toeventType.
-
Method Details
-
subscribe
Subscribeshandlerto every published event assignable toeventType.- Returns:
- a handle whose
close()deregisters the subscription. Plugin teardown closes every handle issued to a plugin automatically, even ones the plugin author forgot to close, but authors should still close what they no longer need promptly.
-