org.jboss.system.server.profileservice.hotdeploy
Class HDScanner

java.lang.Object
  extended by org.jboss.system.server.profileservice.hotdeploy.HDScanner
All Implemented Interfaces:
Runnable, Scanner

public class HDScanner
extends Object
implements Runnable, Scanner

A DeploymentScanner built on the ProfileService and MainDeployer. This is really just a simple ExecutorService Runnable that knows nothing about how to detect changed deployers. The ProfileService determines this.

Version:
$Revision: 88963 $
Author:
Dimitris Andreadis, Scott.Stark@jboss.org, adrian@jboss.org, Emanuel Muckenhuber, Ales Justin
See Also:
MainDeployer, ProfileService

Constructor Summary
HDScanner()
           
 
Method Summary
 void create()
           
 void destroy()
           
 org.jboss.profileservice.spi.ProfileService getProfileService()
           
 int getScanCount()
           
 ScheduledExecutorService getScanExecutor()
           
 long getScanPeriod()
           
 String getScanThreadName()
           
protected  void incScanCount()
          Inc the scanCount and to a notifyAll.
 boolean isCreatedScanExecutor()
           
 boolean isScanEnabled()
          Are deployment scans enabled.
 void resetScanCount()
           
 void resume()
          Resume scanning.
 void run()
          Executes scan
 void scan()
          Do scan.
 void setDeployer(MainDeployerAdapter deployer)
           
 void setProfileService(org.jboss.profileservice.spi.ProfileService profileService)
           
 void setScanEnabled(boolean scanEnabled)
          Enable/disable deployment scans.
 void setScanExecutor(ScheduledExecutorService scanExecutor)
           
 void setScanPeriod(long period)
           
 void setScanThreadName(String scanThreadName)
           
 void start()
           
 void stop()
           
 void suspend()
          Suspend scanning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HDScanner

public HDScanner()
Method Detail

setDeployer

public void setDeployer(MainDeployerAdapter deployer)

getProfileService

public org.jboss.profileservice.spi.ProfileService getProfileService()

setProfileService

public void setProfileService(org.jboss.profileservice.spi.ProfileService profileService)

getScanExecutor

public ScheduledExecutorService getScanExecutor()
Returns:
Returns the scanExecutor.

setScanExecutor

public void setScanExecutor(ScheduledExecutorService scanExecutor)
Parameters:
scanExecutor - The scanExecutor to set.

getScanThreadName

public String getScanThreadName()

setScanThreadName

public void setScanThreadName(String scanThreadName)

getScanPeriod

public long getScanPeriod()

setScanPeriod

public void setScanPeriod(long period)

isScanEnabled

public boolean isScanEnabled()
Are deployment scans enabled.

Returns:
whether scan is enabled

getScanCount

public int getScanCount()

resetScanCount

public void resetScanCount()

setScanEnabled

public void setScanEnabled(boolean scanEnabled)
Enable/disable deployment scans.

Parameters:
scanEnabled - true to enable scans, false to disable.

isCreatedScanExecutor

public boolean isCreatedScanExecutor()

create

public void create()
            throws Exception
Throws:
Exception

start

public void start()

stop

public void stop()

destroy

public void destroy()

run

public void run()
Executes scan

Specified by:
run in interface Runnable

suspend

public void suspend()
Description copied from interface: Scanner
Suspend scanning.

Specified by:
suspend in interface Scanner

resume

public void resume()
Description copied from interface: Scanner
Resume scanning.

Specified by:
resume in interface Scanner

scan

public void scan()
          throws Exception
Description copied from interface: Scanner
Do scan.

Specified by:
scan in interface Scanner
Throws:
Exception - for any error

incScanCount

protected void incScanCount()
Inc the scanCount and to a notifyAll.



Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.