Using Threads in Profiles [message #1776128] |
Sun, 12 November 2017 15:09  |
Eclipse User |
|
|
|
Hi everyone,
Since we now have support for profiles in ESH, I am currently writing my second profile.
This profile needs to use a scheduler in order to transform button presses into long or short presses and button-holds and from there to ON, OFF, and Increase, Decrease events.
In the ThingHandlers there is access to a scheduler from the base class.
In the Profiles there is no such scheduler. When trying to get one the same way as the base handler like this:
ScheduledExecutorService scheduler = ThreadPoolManager .getScheduledPool(THING_HANDLER_THREADPOOL_NAME);
Eclipse complains about using a non-API class.
So there are two questions:
1.: Is it okay to just add the package that contains the scheduler to the imports in the MANIFEST.MF file anyways, even if the class is not part of the API?
2.: Is it okay to create a new pool for the profiles? Which keyword should I use to get this pool?
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03489 seconds