public class SampleServiceImpl implements SampleService, ResourceChangeListener {
// Paths to watch for cache update
@Property(label = "Paths to watch for cache update", value = { PageConstants.DUTY_STATION_FOLDER_PATH,
AssetConstants.FLAG_IMAGE_FOLDER_PATH })
private static final String PATHS_TO_WATCH = ResourceChangeListener.PATHS;
....
Step 3: Create an OSGi configuration for the service with property ‘resource.paths’
Step 4: Deploy your code. Verify that the Listener listens to the updated paths configured via:
OSGi Configuration node created in Step 3
Path updates via OSGi Web Console
Here is the sample code using DS annotations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters