org.codehaus.cargo.container.deployer
Class URLDeployableMonitor

java.lang.Object
  extended by org.codehaus.cargo.util.log.LoggedObject
      extended by org.codehaus.cargo.container.deployer.URLDeployableMonitor
All Implemented Interfaces:
DeployableMonitor, Loggable

public class URLDeployableMonitor
extends LoggedObject
implements DeployableMonitor

Monitor that verifies if a Deployable is deployed by pinging a URL provided by the user.

Version:
$Id: URLDeployableMonitor.java 1207 2006-11-07 08:49:00Z vmassol $

Constructor Summary
URLDeployableMonitor(java.net.URL pingURL)
           
URLDeployableMonitor(java.net.URL pingURL, long timeout)
           
 
Method Summary
 java.lang.String getDeployableName()
          
 long getTimeout()
          
 void monitor()
          Check the deployment status of the associated Deployable and tell the registered DeployableMonitorListener about the status.
 void registerListener(DeployableMonitorListener listener)
          Register a listener that we will warn about the deployment status of the associated Deployable.
 
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject
getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.codehaus.cargo.util.log.Loggable
getLogger, setLogger
 

Constructor Detail

URLDeployableMonitor

public URLDeployableMonitor(java.net.URL pingURL)
Parameters:
pingURL - the URL to be pinged and which will tell when the Deployable is deployed

URLDeployableMonitor

public URLDeployableMonitor(java.net.URL pingURL,
                            long timeout)
Parameters:
pingURL - the URL to be pinged and which will tell when the Deployable is deployed
timeout - the timeout after which we stop monitoring the deployment
Method Detail

getDeployableName

public java.lang.String getDeployableName()

Specified by:
getDeployableName in interface DeployableMonitor
Returns:
a string identifying the deployable that is monitored
See Also:
DeployableMonitor.getDeployableName()

registerListener

public void registerListener(DeployableMonitorListener listener)
Register a listener that we will warn about the deployment status of the associated Deployable.

Specified by:
registerListener in interface DeployableMonitor
Parameters:
listener - the listener to register
See Also:
DeployableMonitor.registerListener(DeployableMonitorListener)

monitor

public void monitor()
Description copied from interface: DeployableMonitor
Check the deployment status of the associated Deployable and tell the registered DeployableMonitorListener about the status.

Specified by:
monitor in interface DeployableMonitor
See Also:
DeployableMonitor.monitor()

getTimeout

public long getTimeout()

Specified by:
getTimeout in interface DeployableMonitor
Returns:
the timeout after which we stop monitoring the Deployable
See Also:
DeployableMonitor.getTimeout()


Copyright © 2004-2011 Codehaus. All Rights Reserved.