|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.deployment.scanner.AbstractDeploymentScanner
public abstract class AbstractDeploymentScanner
An abstract support class for implementing a deployment scanner.
Provides the implementation of period-based scanning, as well as Deployer integration.
Sub-classes only need to implement DeploymentScanner.scan().
| Nested Class Summary | |
|---|---|
class |
AbstractDeploymentScanner.ScannerThread
Should use Timer/TimerTask instead? This has some issues with interaction with ScanEnabled attribute. |
| Field Summary | |
|---|---|
protected Deployer |
deployer
A proxy to the deployer we are using. |
protected MainDeployerMBean |
mainDeployer
|
protected boolean |
scanEnabled
True if period based scanning is enabled. |
protected AbstractDeploymentScanner.ScannerThread |
scannerThread
The scanner thread. |
protected long |
scanPeriod
The scan period in milliseconds |
protected long |
stopTimeOut
The stop timeout |
| Fields inherited from class org.jboss.system.ServiceMBeanSupport |
|---|
log, server, SERVICE_CONTROLLER_SIG, serviceName |
| Fields inherited from interface org.jboss.system.ServiceMBean |
|---|
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
| Constructor Summary | |
|---|---|
AbstractDeploymentScanner()
|
|
| Method Summary | |
|---|---|
protected void |
createService()
Sub-classes should override this method to provide custum 'create' logic. |
protected void |
destroyService()
Sub-classes should override this method to provide custum 'destroy' logic. |
javax.management.ObjectName |
getDeployer()
Get the ObjectName of the Deployer which we are using. |
long |
getScanPeriod()
Get the scan period for the scanner. |
long |
getStopTimeOut()
How long to wait in stop for the background thread to stop |
boolean |
isScanEnabled()
Check if period based scanning is enabled. |
abstract void |
scan()
This is here to work around a bug in the IBM vm that causes an AbstractMethodError to be thrown when the ScannerThread calls scan. |
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)
Period must be >= 0. |
void |
setStopTimeOut(long stopTimeOut)
How long to wait in stop for the background thread to stop |
protected void |
startService()
Sub-classes should override this method to provide custum 'start' logic. |
protected void |
stopService()
Sub-classes should override this method to provide custum 'stop' logic. |
| Methods inherited from class org.jboss.system.ServiceMBeanSupport |
|---|
create, destroy, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop |
| Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
|---|
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jboss.system.ServiceMBean |
|---|
getName, getState, getStateString, jbossInternalLifecycle |
| Field Detail |
|---|
protected long scanPeriod
protected boolean scanEnabled
protected long stopTimeOut
protected Deployer deployer
protected MainDeployerMBean mainDeployer
protected AbstractDeploymentScanner.ScannerThread scannerThread
| Constructor Detail |
|---|
public AbstractDeploymentScanner()
| Method Detail |
|---|
public void setDeployer(javax.management.ObjectName deployerName)
DeploymentScannerDeployer which we will use.
setDeployer in interface DeploymentScannersetDeployer in interface DeploymentScannerMBeandeployerName - The object name of the deployer to use.public javax.management.ObjectName getDeployer()
DeploymentScannerDeployer which we are using.
getDeployer in interface DeploymentScannergetDeployer in interface DeploymentScannerMBeanpublic void setScanPeriod(long period)
setScanPeriod in interface DeploymentScannersetScanPeriod in interface DeploymentScannerMBeanperiod - This is the time in milliseconds between scans.public long getScanPeriod()
DeploymentScanner
getScanPeriod in interface DeploymentScannerpublic void setScanEnabled(boolean flag)
DeploymentScannerManual scanning can still be performed by calling
DeploymentScanner.scan().
setScanEnabled in interface DeploymentScannersetScanEnabled in interface DeploymentScannerMBeanflag - True to enable or false to disable period
based scanning.public boolean isScanEnabled()
DeploymentScanner
isScanEnabled in interface DeploymentScannerisScanEnabled in interface DeploymentScannerMBeanpublic long getStopTimeOut()
DeploymentScannerMBean
getStopTimeOut in interface DeploymentScannerMBeanpublic void setStopTimeOut(long stopTimeOut)
DeploymentScannerMBean
setStopTimeOut in interface DeploymentScannerMBeanstopTimeOut - the time in milliseconds.
public abstract void scan()
throws Exception
scan in interface DeploymentScannerscan in interface DeploymentScannerMBeanException
IllegalStateException - Not initialized.
protected void createService()
throws Exception
ServiceMBeanSupportThis method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
createService in class ServiceMBeanSupportException
protected void startService()
throws Exception
ServiceMBeanSupportThis method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
startService in class ServiceMBeanSupportException
protected void stopService()
throws Exception
ServiceMBeanSupportThis method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
stopService in class ServiceMBeanSupportException
protected void destroyService()
throws Exception
ServiceMBeanSupportThis method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
destroyService in class ServiceMBeanSupportException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||