Class FileChangedEvent
- java.lang.Object
-
- java.util.EventObject
-
- io.micronaut.context.event.ApplicationEvent
-
- io.micronaut.scheduling.io.watch.event.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
-
-
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()
-
-
-
Constructor Detail
-
FileChangedEvent
public FileChangedEvent(@NonNull java.nio.file.Path path, @NonNull WatchEventType eventType)
Constructs a new file changed event.- Parameters:
path
- The patheventType
- 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 patheventType
- The event type
-
-
Method Detail
-
getSource
@NonNull public java.nio.file.Path getSource()
- Overrides:
getSource
in classjava.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
-
-