Top Fields Constructors Methods
org.apache.tomcat.util.scan

public Class StandardJarScanFilter

extends Object
implements JarScanFilter
Class Inheritance
All Implemented Interfaces
org.apache.tomcat.JarScanFilter
Imports
java.util.HashSet, .Set, .StringTokenizer, java.util.concurrent.locks.Lock, .ReadWriteLock, .ReentrantReadWriteLock, org.apache.tomcat.JarScanFilter, .JarScanType, org.apache.tomcat.util.file.Matcher

Field Summary

Modifier and TypeField and Description
private final ReadWriteLock
private boolean
private static final String
private static final Set<String>
private static final String
private static final boolean
private static final Set<String>
private boolean
private String
private final Set<String>
private String
private final Set<String>
private String
private final Set<String>
private String
private final Set<String>

Constructor Summary

AccessConstructor and Description
public
StandardJarScanFilter()

This is the standard implementation of JarScanFilter.

Method Summary

Modifier and TypeMethod and Description
public boolean
check(JarScanType
The type of JAR scan currently being performed
jarScanType
,
String
The name of the JAR file (without any path information) to be checked to see if it should be included in the results or not
jarName
)

Implements org.apache.tomcat.JarScanFilter.check.

public String
public String
public String
public String
public boolean
public boolean
public boolean
private static void
public void
setDefaultPluggabilityScan(boolean defaultPluggabilityScan)

public void
setDefaultTldScan(boolean defaultTldScan)

public void
setPluggabilityScan(String pluggabilityScan)

public void
setPluggabilitySkip(String pluggabilitySkip)

public void
setTldScan(String tldScan)

public void
setTldSkip(String tldSkip)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

configurationLockback to summary
private final ReadWriteLock configurationLock
defaultPluggabilityScanback to summary
private boolean defaultPluggabilityScan
defaultScanback to summary
private static final String defaultScan
defaultScanSetback to summary
private static final Set<String> defaultScanSet
defaultSkipback to summary
private static final String defaultSkip
defaultSkipAllback to summary
private static final boolean defaultSkipAll
defaultSkipSetback to summary
private static final Set<String> defaultSkipSet
defaultTldScanback to summary
private boolean defaultTldScan
pluggabilityScanback to summary
private String pluggabilityScan
pluggabilityScanSetback to summary
private final Set<String> pluggabilityScanSet
pluggabilitySkipback to summary
private String pluggabilitySkip
pluggabilitySkipSetback to summary
private final Set<String> pluggabilitySkipSet
tldScanback to summary
private String tldScan
tldScanSetback to summary
private final Set<String> tldScanSet
tldSkipback to summary
private String tldSkip
tldSkipSetback to summary
private final Set<String> tldSkipSet

Constructor Detail

StandardJarScanFilterback to summary
public StandardJarScanFilter()

This is the standard implementation of JarScanFilter. By default, the following filtering rules are used:

  • JARs that match neither the skip nor the scan list will be included in scan results.
  • JARs that match the skip list but not the scan list will be excluded from scan results.
  • JARs that match the scan list will be included from scan results.
The default skip list and default scan list are obtained from the system properties Constants#SKIP_JARS_PROPERTY and Constants#SCAN_JARS_PROPERTY respectively. These default values may be over-ridden for the JarScanType#TLD and JarScanType#PLUGGABILITY scans. The filtering rules may also be modified for these scan types using setDefaultTldScan(boolean) and setDefaultPluggabilityScan(boolean). If set to false, the following filtering rules are used for associated type:
  • JARs that match neither the skip nor the scan list will be excluded from scan results.
  • JARs that match the scan list but not the skip list will be included in scan results.
  • JARs that match the skip list will be excluded from scan results.

Method Detail

checkback to summary
public boolean check(JarScanType jarScanType, String jarName)

Implements org.apache.tomcat.JarScanFilter.check.

Parameters
jarScanType:JarScanType

Doc from org.apache.tomcat.JarScanFilter.check.

The type of JAR scan currently being performed

jarName:String

Doc from org.apache.tomcat.JarScanFilter.check.

The name of the JAR file (without any path information) to be checked to see if it should be included in the results or not

Returns:boolean

Doc from org.apache.tomcat.JarScanFilter.check.

true if the JAR should be returned in the results, false if it should be excluded

Annotations
@Override
getPluggabilityScanback to summary
public String getPluggabilityScan()
getPluggabilitySkipback to summary
public String getPluggabilitySkip()
getTldScanback to summary
public String getTldScan()
getTldSkipback to summary
public String getTldSkip()
isDefaultPluggabilityScanback to summary
public boolean isDefaultPluggabilityScan()
isDefaultTldScanback to summary
public boolean isDefaultTldScan()
isSkipAllback to summary
public boolean isSkipAll()

Overrides default org.apache.tomcat.JarScanFilter.isSkipAll.

Returns:boolean

Doc from org.apache.tomcat.JarScanFilter.isSkipAll.

true if all of the scans should be skipped which can improve startup performance. The default is false.

Annotations
@Override
populateSetFromAttributeback to summary
private static void populateSetFromAttribute(String attribute, Set<String> set)
setDefaultPluggabilityScanback to summary
public void setDefaultPluggabilityScan(boolean defaultPluggabilityScan)
setDefaultTldScanback to summary
public void setDefaultTldScan(boolean defaultTldScan)
setPluggabilityScanback to summary
public void setPluggabilityScan(String pluggabilityScan)
setPluggabilitySkipback to summary
public void setPluggabilitySkip(String pluggabilitySkip)
setTldScanback to summary
public void setTldScan(String tldScan)
setTldSkipback to summary
public void setTldSkip(String tldSkip)