Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

osgi: question about bundle communication / design  RSS feed

 
olze oli
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i'm building an application which can send events (with EventAdmin from apache felix), thats the GUI part (eg. "event/buttonXYZ"), so the listeners know when the user hits something in the gui that they should react, or not.
The problem is now that i dont know how many listeners i will have that listen to my main application (they are dynamic), so i have to tell the bundles(plugins) somehow to register itself with the EventHandler


can someone tell me whats the best practice in doing so?
 
Michael Van
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should consider using Aries or Spring to register your service is the OSGi Service Admin Service. In my opinion, it is more straight-forward than putting in your classes.

Mike Van
Apache Software Foundation Committer

olze oli wrote:hi,

i'm building an application which can send events (with EventAdmin from apache felix), thats the GUI part (eg. "event/buttonXYZ"), so the listeners know when the user hits something in the gui that they should react, or not.
The problem is now that i dont know how many listeners i will have that listen to my main application (they are dynamic), so i have to tell the bundles(plugins) somehow to register itself with the EventHandler


can someone tell me whats the best practice in doing so?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!