Class MacOsWatchServiceFactory
java.lang.Object
io.micronaut.scheduling.io.watch.osx.MacOsWatchServiceFactory
@Requires(property="micronaut.io.watch.enabled",value="true",defaultValue="true") @Requires(condition=FileWatchCondition.class) @Requires(classes={io.methvin.watchservice.MacOSXListeningWatchService.class,com.sun.jna.Library.class})
@Factory
public class MacOsWatchServiceFactory
extends Object
A factory that creates the
WatchService
. For Mac OS X this class will try to instantiate
MacOSXListeningWatchService
otherwise fall back to the default with a warning.- Since:
- 1.1.0
- Author:
- graemerocher
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG
-
-
Constructor Details
-
MacOsWatchServiceFactory
public MacOsWatchServiceFactory()
-
-
Method Details
-
macWatchService
@Bean(preDestroy="close") @Prototype @Requires(classes={io.methvin.watchservice.MacOSXListeningWatchService.class,com.sun.jna.Library.class}) @Requires(property="micronaut.io.watch.enabled",value="true",defaultValue="true") @Requires(property="micronaut.io.watch.paths") @Primary protected WatchService macWatchService() throws IOExceptionThe defaultWatchService
.- Returns:
- The watch service to use.
- Throws:
IOException
- if an error occurs creating the watch service
-