@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
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 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 WatchService macWatchService() throws IOException
WatchService
.IOException
- if an error occurs creating the watch service