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

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

public static interface DirectoryMonitor.Listener


Method Summary
 String fileAdded(File file)
           
 boolean fileRemoved(File file, String configId)
           
 String fileUpdated(File file, String configId)
           
 long getDeploymentTime(File file, String configId)
          Called during initialization on previously deployed files.
 String getModuleId(String config)
          This method returns the module id of an application deployed in the default group.
 boolean isFileDeployed(File file, String configId)
          Checks if the file with same configID is already deployed
 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

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

boolean isFileDeployed(File file,
                       String configId)
Checks if the file with same configID is already deployed

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

getDeploymentTime

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

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


validateFile

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

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

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

String fileUpdated(File file,
                   String configId)

getModuleId

String getModuleId(String config)
This method returns the module id of an application deployed in the default group.

Returns:
String respresenting the ModuleId if the application is already deployed


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