org.jboss.deployment.scanner
Class URLDirectoryScanner

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.deployment.scanner.AbstractDeploymentScanner (src) 
              extended byorg.jboss.deployment.scanner.URLDirectoryScanner
All Implemented Interfaces:
DeploymentScanner (src) , MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src)

public class URLDirectoryScanner
extends AbstractDeploymentScanner (src)
implements DeploymentScanner (src)

This class is similar to the URLDeploymentScanner (

See Also:
org.jboss.deployment.scanner.URLDeploymentScanner). It is designed to deploy direct URLs and to scan directories. The distinction between the two is that this class forces the user to specify which entries are directories to scan, and which are urls to deploy.

Nested Class Summary
 
Nested classes inherited from class org.jboss.deployment.scanner.AbstractDeploymentScanner (src)
AbstractDeploymentScanner.ScannerThread (src)
 
Field Summary
 
Fields inherited from class org.jboss.deployment.scanner.AbstractDeploymentScanner (src)
deployer, mainDeployer, scanEnabled, scannerThread, scanPeriod
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean (src)
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
URLDirectoryScanner()
           
 
Method Summary
 void addScanDir(java.lang.String urlSpec, java.lang.String compClassName, java.lang.String filterClassName)
           
 void addScanDir(java.net.URL url, java.util.Comparator comp, java.io.FileFilter filter)
           
 void addScanURL(java.lang.String url)
           
 void addScanURL(java.net.URL url)
           
 java.lang.String getFilter()
           
 java.lang.String getURLComparator()
           
 ObjectName (src) preRegister(MBeanServer (src)  server, ObjectName (src)  name)
          Obtain the Service values.
 void removeScanURL(java.net.URL url)
           
 void scan()
          Scan all urls.
 void setFilter(java.lang.String filterClassName)
           
 void setURLComparator(java.lang.String comparatorClassName)
           
 void setURLs(org.w3c.dom.Element elem)
           
 
Methods inherited from class org.jboss.deployment.scanner.AbstractDeploymentScanner (src)
createService, destroyService, getDeployer, getScanPeriod, isScanEnabled, setDeployer, setScanEnabled, setScanPeriod, startService, stopService
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, destroy, 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 (src)
addNotificationListener, getNotificationInfo, handleNotification, 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 (src)
getDeployer, getScanPeriod, isScanEnabled, setDeployer, setScanEnabled, setScanPeriod
 
Methods inherited from interface org.jboss.system.Service (src)
create, destroy, start, stop
 

Constructor Detail

URLDirectoryScanner

public URLDirectoryScanner()
Method Detail

addScanURL

public void addScanURL(java.net.URL url)

addScanURL

public void addScanURL(java.lang.String url)
                throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

addScanDir

public void addScanDir(java.net.URL url,
                       java.util.Comparator comp,
                       java.io.FileFilter filter)

addScanDir

public void addScanDir(java.lang.String urlSpec,
                       java.lang.String compClassName,
                       java.lang.String filterClassName)
                throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

removeScanURL

public void removeScanURL(java.net.URL url)

setURLs

public void setURLs(org.w3c.dom.Element elem)

setURLComparator

public void setURLComparator(java.lang.String comparatorClassName)

getURLComparator

public java.lang.String getURLComparator()

setFilter

public void setFilter(java.lang.String filterClassName)

getFilter

public java.lang.String getFilter()

scan

public void scan()
Scan all urls.

Specified by:
scan in interface DeploymentScanner (src)
Specified by:
scan in class AbstractDeploymentScanner (src)

preRegister

public ObjectName (src)  preRegister(MBeanServer (src)  server,
                              ObjectName (src)  name)
                       throws java.lang.Exception
Obtain the Service values. This was copied from Jason Dillons URLDeploymentScanner. Thanks Jason!

Specified by:
preRegister in interface MBeanRegistration (src)
Overrides:
preRegister in class ServiceMBeanSupport (src)
Parameters:
server - Reference to the JMX Agent this MBean is registered on
name - 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).
Throws:
java.lang.Exception