Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » Confusion about ThingHandlerFactory(How to register ThingHandlerFactory as an OSGi service?)
icon11.gif  Confusion about ThingHandlerFactory [message #1697367] Wed, 03 June 2015 13:24 Go to next message
Matteo Fu is currently offline Matteo FuFriend
Messages: 1
Registered: May 2015
Junior Member
Although this seems to be a very basic problem, I hope to know the inner mechanism to register a ThingHandlerFactory. As we know each binding should implement its own ThingHandlerFactory and register it as an OSGi service. Take yahooweather binding for instance, YahooWeatherHandlerFactory does not provide any method to register itself as an OSGi service. When turn to BasicThingHandler, it seems that active method might be the right method. However, how to invoke such a method is not shown in BasicThingHandler. So I turn to OSGI-INF folder, in which I found YahooWeatherHandlerFactory.xml. Is it the xml file to be processed by org.eclipse.smarthome.config packages, in order to register it as a service? And how? I hope my question is clear. Smile
Re: Confusion about ThingHandlerFactory [message #1697400 is a reply to message #1697367] Wed, 03 June 2015 15:47 Go to previous message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
Hi Matteo,

These XML are nothing specific to Eclipse SmartHome, but they are the general OSGi Declarative Services approach to handling and injecting services. You can find all details about this here: http://wiki.osgi.org/wiki/Declarative_Services

Regards,
Kai
Previous Topic:Tags and Groups?
Next Topic:Get State of channel in ThingHandler
Goto Forum:
  


Current Time: Fri Apr 26 13:41:16 GMT 2024

Powered by FUDForum. Page generated in 0.02865 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top