站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 system API Documentation 英文版文档

DeploymentScanner (JBoss System API) - JBoss 3.2.7 system API Documentation 英文版文档


org.jboss.deployment.scanner
Interface DeploymentScanner

All Superinterfaces:
Service
All Known Implementing Classes:
AbstractDeploymentScanner, URLDeploymentScanner, URLDirectoryScanner

public interface DeploymentScanner
extends Service

Provides the basic interface for a deployment scanner.

A deployment scanner scans for new, removed or changed deployments.

Version:
$Revision: 1.4 $
Author:
Jason Dillon

Method Summary
 javax.management.ObjectName getDeployer()
          Get the ObjectName of the Deployer which we are using.
 long getScanPeriod()
          Get the scan period for the scanner.
 boolean isScanEnabled()
          Check if period based scanning is enabled.
 void scan()
          Scan for deployment changes.
 void setDeployer(javax.management.ObjectName deployerName)
          The ObjectName of the Deployer which we will use.
 void setScanEnabled(boolean flag)
          Disable or enable the period based deployment scanning.
 void setScanPeriod(long period)
          Set the scan period for the scanner.
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Method Detail

setDeployer

public void setDeployer(javax.management.ObjectName deployerName)
The ObjectName of the Deployer which we will use.

Parameters:
deployerName - The object name of the deployer to use.

getDeployer

public javax.management.ObjectName getDeployer()
Get the ObjectName of the Deployer which we are using.

Returns:
The object name of the deployer we are using.

setScanPeriod

public void setScanPeriod(long period)
Set the scan period for the scanner.

Parameters:
period - This is the time in milliseconds between scans.
Throws:
IllegalArgumentException - Period value out of range.

getScanPeriod

public long getScanPeriod()
Get the scan period for the scanner.

Returns:
This is the time in milliseconds between scans.

setScanEnabled

public void setScanEnabled(boolean flag)
Disable or enable the period based deployment scanning.

Manual scanning can still be performed by calling scan().

Parameters:
flag - True to enable or false to disable period based scanning.

isScanEnabled

public boolean isScanEnabled()
Check if period based scanning is enabled.

Returns:
True if enabled, false if disabled.

scan

public void scan()
          throws Exception
Scan for deployment changes.

Throws:
IllegalStateException - Not initialized.
Exception - Scan failed.


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.