Class FileChangedEvent

  • All Implemented Interfaces:
    java.io.Serializable

    public class FileChangedEvent
    extends io.micronaut.context.event.ApplicationEvent
    Event fired when a file that is being watched changes.
    Since:
    1.1.0
    See Also:
    FileWatchConfiguration, Serialized Form
    • Field Summary

      • Fields inherited from class java.util.EventObject

        source
    • Constructor Summary

      Constructors 
      Constructor Description
      FileChangedEvent​(java.nio.file.Path path, WatchEventType eventType)
      Constructs a new file changed event.
      FileChangedEvent​(java.nio.file.Path path, java.nio.file.WatchEvent.Kind eventType)
      Constructs a new file changed event.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      WatchEventType getEventType()
      The watch event type.
      java.nio.file.Path getPath()
      The path to the file / directory that changed.
      java.nio.file.Path getSource()  
      • Methods inherited from class java.util.EventObject

        toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FileChangedEvent

        public FileChangedEvent​(@NonNull
                                java.nio.file.Path path,
                                @NonNull
                                WatchEventType eventType)
        Constructs a new file changed event.
        Parameters:
        path - The path
        eventType - The event type
      • FileChangedEvent

        public FileChangedEvent​(@NonNull
                                java.nio.file.Path path,
                                @NonNull
                                java.nio.file.WatchEvent.Kind eventType)
        Constructs a new file changed event.
        Parameters:
        path - The path
        eventType - The event type
    • Method Detail

      • getSource

        @NonNull
        public java.nio.file.Path getSource()
        Overrides:
        getSource in class java.util.EventObject
      • getPath

        @NonNull
        public java.nio.file.Path getPath()
        The path to the file / directory that changed.
        Returns:
        The path
      • getEventType

        @NonNull
        public WatchEventType getEventType()
        The watch event type.
        Returns:
        The event type