Annotation Type OnResourceFileEvent


  • @Target(METHOD)
    @Retention(RUNTIME)
    @Documented
    public @interface OnResourceFileEvent
    Event for a resource change (change of a file on the filesystem).

    Use with a non static method.

    Method attribute types:

    • URI - URI of the watched resource
    • URL - URL of the watched resource
    • ClassLoader - the application classloader
    • ClassPool - initialized javassist classpool
    Author:
    Jiri Bubnik
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String path
      Prefix of resource path to watch.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      FileEvent[] events
      Filter watch event types.
      String filter
      Regexp expression to filter resources.
      boolean onlyRegularFiles
      Watch only for regular files.
      int timeout
      Merge multiple same watch events up to this timeout into a single watch event (useful to merge multiple MODIFY events).
    • Element Detail

      • path

        String path
        Prefix of resource path to watch.
      • filter

        String filter
        Regexp expression to filter resources.
        Default:
        ""
      • events

        FileEvent[] events
        Filter watch event types. Default is all events (CREATE, MODIFY, DELETE).
        Default:
        {org.hotswap.agent.annotation.FileEvent.CREATE, org.hotswap.agent.annotation.FileEvent.MODIFY, org.hotswap.agent.annotation.FileEvent.DELETE}
      • onlyRegularFiles

        boolean onlyRegularFiles
        Watch only for regular files. By default all other types (including directories) are filtered out.
        Returns:
        true to filter out other types than regular types.
        Default:
        true
      • timeout

        int timeout
        Merge multiple same watch events up to this timeout into a single watch event (useful to merge multiple MODIFY events).
        Default:
        50