com.atlassian.plugin.loaders.classloading
Class Scanner

java.lang.Object
  extended by com.atlassian.plugin.loaders.classloading.Scanner

public class Scanner
extends java.lang.Object

Scans the filesystem for changed or added plugin jars and stores a map of the currently known ones.


Constructor Summary
Scanner(java.io.File libDir)
          Constructor for scanner.
 
Method Summary
 void clear(java.io.File file)
          Tells the Scanner to forget about a file it has loaded so that it will reload it next time it scans.
 void clearAll()
          Clears the list of scanned deployment units.
 java.util.Collection getDeploymentUnits()
          Retrieve all the DeploymentUnits currently stored.
 DeploymentUnit locateDeploymentUnit(java.io.File file)
          Given a file, finds the deployment unit for it if one has already been scanned.
 java.util.Collection scan()
          Scans for jars that have been added or modified since the last call to scan.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scanner

public Scanner(java.io.File libDir)
Constructor for scanner.

Parameters:
libDir -
Method Detail

locateDeploymentUnit

public DeploymentUnit locateDeploymentUnit(java.io.File file)
Given a file, finds the deployment unit for it if one has already been scanned.

Parameters:
file - a jar file.
Returns:
the stored deploymentUnit matching the file or null if none exists.

clear

public void clear(java.io.File file)
Tells the Scanner to forget about a file it has loaded so that it will reload it next time it scans.

Parameters:
file - a file that may have already been scanned.

scan

public java.util.Collection scan()
Scans for jars that have been added or modified since the last call to scan.

Returns:
Collection of DeploymentUnits that describe newly added Jars.

getDeploymentUnits

public java.util.Collection getDeploymentUnits()
Retrieve all the DeploymentUnits currently stored.

Returns:
the complete unmodifiable list of scanned DeploymentUnits.

clearAll

public void clearAll()
Clears the list of scanned deployment units.



Copyright © 2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.