Search code examples
osgiapache-felixapache-karaf

How to manually send OSGi events to the EventAdmin?


Currently, I would need to create a bundle that sends an event with eventAdmin.sendEvent(event). However, for testing purposes it would be nice to be able to send events manually. Is that possible, using one or another OSGi shell?


Solution

  • Yes, you can create a console extension that adds specific commands - in your case commands that create & send specific events. See this documentation page.