Package io.micronaut.scheduling.io.watch
Class WatchServiceFactory
- java.lang.Object
-
- io.micronaut.scheduling.io.watch.WatchServiceFactory
-
@Requires(property="micronaut.io.watch.enabled",value="true",defaultValue="true") @Requires(condition=FileWatchCondition.class) @Requires(missingClasses="io.methvin.watchservice.MacOSXListeningWatchService") @Factory public class WatchServiceFactory extends java.lang.Object
A factory that creates the default watch service.- Since:
- 1.1.0
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
LOG
-
Constructor Summary
Constructors Constructor Description WatchServiceFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.file.WatchService
watchService()
The defaultWatchService
.
-
-
-
Method Detail
-
watchService
@Bean(preDestroy="close") @Prototype @Requires(missingClasses="io.methvin.watchservice.MacOSXListeningWatchService") @Requires(property="micronaut.io.watch.enabled",value="true",defaultValue="true") @Requires(property="micronaut.io.watch.paths") @Primary public java.nio.file.WatchService watchService() throws java.io.IOException
The defaultWatchService
.- Returns:
- The watch service to use.
- Throws:
java.io.IOException
- if an error occurs creating the watch service
-
-