|
||||||||||
| 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
org.jboss.deployment.scanner.URLDeploymentScanner
public class URLDeploymentScanner
A URL-based deployment scanner. Supports local directory scanning for file-based urls.
| Nested Class Summary | |
|---|---|
protected class |
URLDeploymentScanner.DeployedURL
A container and help class for a deployed URL. |
| Nested classes/interfaces inherited from class org.jboss.deployment.scanner.AbstractDeploymentScanner |
|---|
AbstractDeploymentScanner.ScannerThread |
| Field Summary | |
|---|---|
protected Set |
deployedSet
A set of scanned urls which have been deployed. |
protected boolean |
doRecursiveSearch
Whether to search inside directories whose names containing no dots |
protected org.jboss.net.protocol.URLLister.URLFilter |
filter
Allow a filter for scanned directories |
protected IncompleteDeploymentException |
lastIncompleteDeploymentException
|
protected org.jboss.net.protocol.URLListerFactory |
listerFactory
Helper for listing local/remote directory URLs |
protected File |
serverHome
The server's home directory, for relative paths. |
protected URL |
serverHomeURL
|
protected Set |
skipSet
A set of deployment URLs to skip |
protected Comparator |
sorter
A sorter urls from a scaned directory to allow for coarse dependency ordering based on file type |
protected List |
urlList
The list of URLs to scan. |
| Fields inherited from class org.jboss.deployment.scanner.AbstractDeploymentScanner |
|---|
deployer, mainDeployer, scanEnabled, scannerThread, scanPeriod, stopTimeOut |
| 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 | |
|---|---|
URLDeploymentScanner()
|
|
| Method Summary | |
|---|---|
void |
addURL(String urlspec)
|
void |
addURL(URL url)
|
protected void |
createService()
Sub-classes should override this method to provide custum 'create' logic. |
protected void |
deploy(URLDeploymentScanner.DeployedURL du)
A helper to deploy the given URL with the deployer. |
String |
getFilter()
|
org.jboss.net.protocol.URLLister.URLFilter |
getFilterInstance()
|
boolean |
getRecursiveSearch()
|
String |
getURLComparator()
|
List |
getURLList()
|
boolean |
hasURL(String urlspec)
|
boolean |
hasURL(URL url)
|
protected boolean |
isDeployed(URL url)
Checks if the url is in the deployed set. |
String |
listDeployedURLs()
Lists all urls deployed by the scanner, each URL on a new line. |
protected URL |
makeURL(String urlspec)
A helper to make a URL from a full url, or a filespec. |
javax.management.ObjectName |
preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
Callback method of MBeanRegistration
before the MBean is registered at the JMX Agent. |
void |
removeURL(String urlspec)
|
void |
removeURL(URL url)
|
void |
resumeDeployment(URL url,
boolean markUpToDate)
Re-enables scanning of a particular deployment URL, previously suspended using suspendDeployment(URL). |
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 |
setFilter(String classname)
|
void |
setFilterInstance(org.jboss.net.protocol.URLLister.URLFilter filter)
|
void |
setRecursiveSearch(boolean recurse)
|
void |
setURLComparator(String classname)
|
void |
setURLList(List list)
|
void |
setURLs(String listspec)
|
void |
suspendDeployment(URL url)
Temporarily ignore changes (addition, updates, removal) to a particular deployment, identified by its deployment URL. |
protected void |
undeploy(URLDeploymentScanner.DeployedURL du)
A helper to undeploy the given URL from the deployer. |
protected boolean |
updateSorter()
|
| Methods inherited from class org.jboss.deployment.scanner.AbstractDeploymentScanner |
|---|
destroyService, getDeployer, getScanPeriod, getStopTimeOut, isScanEnabled, setDeployer, setScanEnabled, setScanPeriod, setStopTimeOut, startService, stopService |
| 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, 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.deployment.scanner.DeploymentScanner |
|---|
getDeployer, getScanPeriod, isScanEnabled, setDeployer, setScanEnabled, setScanPeriod |
| Methods inherited from interface org.jboss.deployment.scanner.DeploymentScannerMBean |
|---|
getDeployer, getStopTimeOut, isScanEnabled, setDeployer, setScanEnabled, setScanPeriod, setStopTimeOut |
| Methods inherited from interface org.jboss.system.ServiceMBean |
|---|
getName, getState, getStateString, jbossInternalLifecycle |
| Field Detail |
|---|
protected Set skipSet
protected List urlList
protected Set deployedSet
protected org.jboss.net.protocol.URLListerFactory listerFactory
protected File serverHome
protected URL serverHomeURL
protected Comparator sorter
protected org.jboss.net.protocol.URLLister.URLFilter filter
protected IncompleteDeploymentException lastIncompleteDeploymentException
protected boolean doRecursiveSearch
| Constructor Detail |
|---|
public URLDeploymentScanner()
| Method Detail |
|---|
public void setRecursiveSearch(boolean recurse)
setRecursiveSearch in interface URLDeploymentScannerMBeanpublic boolean getRecursiveSearch()
getRecursiveSearch in interface URLDeploymentScannerMBeanpublic void setURLList(List list)
setURLList in interface URLDeploymentScannerMBean
public void setURLComparator(String classname)
throws ClassNotFoundException,
IllegalAccessException,
InstantiationException
setURLComparator in interface URLDeploymentScannerMBeanclassname - The name of a Comparator class.
ClassNotFoundException
IllegalAccessException
InstantiationExceptionpublic String getURLComparator()
getURLComparator in interface URLDeploymentScannerMBean
public void setFilter(String classname)
throws ClassNotFoundException,
IllegalAccessException,
InstantiationException
setFilter in interface URLDeploymentScannerMBeanclassname - The name of a FileFilter class.
ClassNotFoundException
IllegalAccessException
InstantiationExceptionpublic String getFilter()
getFilter in interface URLDeploymentScannerMBeanpublic void setFilterInstance(org.jboss.net.protocol.URLLister.URLFilter filter)
setFilterInstance in interface URLDeploymentScannerMBeanfilter - The URLFilter instancepublic org.jboss.net.protocol.URLLister.URLFilter getFilterInstance()
getFilterInstance in interface URLDeploymentScannerMBeanpublic List getURLList()
getURLList in interface URLDeploymentScannerMBeanpublic void addURL(URL url)
addURL in interface URLDeploymentScannerMBeanpublic void removeURL(URL url)
removeURL in interface URLDeploymentScannerMBeanpublic boolean hasURL(URL url)
hasURL in interface URLDeploymentScannerMBeanpublic void suspendDeployment(URL url)
suspendDeployment in interface URLDeploymentScannerMBean
public void resumeDeployment(URL url,
boolean markUpToDate)
resumeDeployment in interface URLDeploymentScannerMBeanpublic String listDeployedURLs()
listDeployedURLs in interface URLDeploymentScannerMBean
public void setURLs(String listspec)
throws MalformedURLException
setURLs in interface URLDeploymentScannerMBeanMalformedURLException
protected URL makeURL(String urlspec)
throws MalformedURLException
MalformedURLException
public void addURL(String urlspec)
throws MalformedURLException
addURL in interface URLDeploymentScannerMBeanMalformedURLException
public void removeURL(String urlspec)
throws MalformedURLException
removeURL in interface URLDeploymentScannerMBeanMalformedURLException
public boolean hasURL(String urlspec)
throws MalformedURLException
hasURL in interface URLDeploymentScannerMBeanMalformedURLExceptionprotected void deploy(URLDeploymentScanner.DeployedURL du)
protected void undeploy(URLDeploymentScanner.DeployedURL du)
protected boolean isDeployed(URL url)
public void scan()
throws Exception
AbstractDeploymentScanner
scan in interface DeploymentScannerscan in interface DeploymentScannerMBeanscan in class AbstractDeploymentScannerIllegalStateException - Not initialized.
Exception - Scan failed.protected boolean updateSorter()
public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
throws Exception
ServiceMBeanSupportMBeanRegistration
before the MBean is registered at the JMX Agent.
Attention: Always call this method when you overwrite it in a subclass because it saves the Object Name of the MBean.
preRegister in interface javax.management.MBeanRegistrationpreRegister in class ServiceMBeanSupportserver - Reference to the JMX Agent this MBean is registered onname - Name specified by the creator of the MBean. Note that you can
overwrite it when the given ObjectName is null otherwise the
change is discarded (maybe a bug in JMX-RI).
Exception
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 AbstractDeploymentScannerException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||