All Downloads are FREE. Search and download functionalities are using the official Maven repository.

public.javadoc.org.spincast.plugins.hotswap.fileswatcher.HotSwapFilesModificationsListener.html Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version






HotSwapFilesModificationsListener (org.spincast:spincast-framework 1.0.0 API)












org.spincast.plugins.hotswap.fileswatcher

Interface HotSwapFilesModificationsListener



  • public interface HotSwapFilesModificationsListener
    A listener for file(s) that are watched for modifications.
    • Method Detail

      • isEnabled

        boolean isEnabled()
        Should this listener be enabled?

        You often want to use such file modifications listeners only during development, for autoreload purposes. In production, you would disable it.

        When this method return false, the listener is not registered, at all.

        A common pattern for this method is to use:

         return getSpincastConfig().isDevelopmentMode();
         
      • getFilesToWatch

        Set<FileToWatch> getFilesToWatch()
        The file(s) to watch.
      • fileModified

        void fileModified(File modifiedFile)
        Called when the watched file(s) are modified.

        Receives the file that was modified.

        The method is called in a new Thread.

Copyright © 2019. All rights reserved.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy