@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 java.lang.Object
WatchService
. For Mac OS X this class will try to instantiate
MacOSXListeningWatchService
otherwise fall back to the default with a warning.Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
MacOsWatchServiceFactory() |
Modifier and Type | Method and Description |
---|---|
protected java.nio.file.WatchService |
macWatchService()
The default
WatchService . |
@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 java.nio.file.WatchService macWatchService() throws java.io.IOException
WatchService
.java.io.IOException
- if an error occurs creating the watch service