org.apache.geronimo.deployment.hot
Interface DirectoryMonitor.Listener

All Known Subinterfaces:
HotDeployer
All Known Implementing Classes:
DirectoryHotDeployer
Enclosing interface:
DirectoryMonitor

public static interface DirectoryMonitor.Listener


Method Summary
 String fileAdded(File file)
           
 boolean fileRemoved(File file, String configId)
           
 void fileUpdated(File file, String configId)
           
 long getDeploymentTime(File file, String configId)
          Called during initialization on previously deployed files.
 boolean isFileDeployed(File file, String configId)
          Called during initialization on all files in the hot deploy directory.
 boolean isServerRunning()
          The directory monitor doesn't take any action unless this method returns true (to avoid deploying before the deploy GBeans are running, etc.).
 void started()
          Called to indicate that the monitor has fully initialized and will be doing normal deployment operations from now on.
 boolean validateFile(File file, String configId)
          Called to check whether a file passes the smell test before attempting to deploy it.
 

Method Detail

isServerRunning

public boolean isServerRunning()
The directory monitor doesn't take any action unless this method returns true (to avoid deploying before the deploy GBeans are running, etc.).


isFileDeployed

public boolean isFileDeployed(File file,
                              String configId)
Called during initialization on all files in the hot deploy directory.

Returns:
true if the file in question is already available in the server, false if it should be deployed on the next pass.

getDeploymentTime

public long getDeploymentTime(File file,
                              String configId)
Called during initialization on previously deployed files.

Returns:
The time that the file was deployed. If the current version in the directory is newer, the file will be updated on the first pass.

started

public void started()
Called to indicate that the monitor has fully initialized and will be doing normal deployment operations from now on.


validateFile

public boolean validateFile(File file,
                            String configId)
Called to check whether a file passes the smell test before attempting to deploy it.

Returns:
true if there's nothing obviously wrong with this file. false if there is (for example, it's clearly not deployable).

fileAdded

public String fileAdded(File file)
Returns:
A configId for the deployment if the addition was processed successfully (or an empty String if the addition was OK but the configId could not be determined). null if the addition failed, in which case the file will be added again next time it changes.

fileRemoved

public boolean fileRemoved(File file,
                           String configId)
Returns:
true if the removal was processed successfully. If not the file will be removed again on the next pass.

fileUpdated

public void fileUpdated(File file,
                        String configId)


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.