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 Object
A factory that creates the default watch service.
Since:
1.1.0
  • Field Details

    • LOG

      protected static final org.slf4j.Logger LOG
  • Constructor Details

    • WatchServiceFactory

      public WatchServiceFactory()
  • Method Details

    • 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 WatchService watchService() throws IOException
      The default WatchService.
      Returns:
      The watch service to use.
      Throws:
      IOException - if an error occurs creating the watch service