Configuration
public class MetaInfConfiguration extends AbstractConfiguration
Scan META-INF of jars to find:
Configuration.ClassList
Modifier and Type | Field | Description |
---|---|---|
static java.util.List<java.lang.String> |
__allScanTypes |
|
static java.lang.String |
CACHED_CONTAINER_FRAGMENTS |
|
static java.lang.String |
CACHED_CONTAINER_RESOURCES |
|
static java.lang.String |
CACHED_CONTAINER_TLDS |
|
static boolean |
DEFAULT_USE_CONTAINER_METAINF_CACHE |
|
static java.lang.String |
METAINF_FRAGMENTS |
|
static java.lang.String |
METAINF_RESOURCES |
|
static java.lang.String |
METAINF_TLDS |
|
static java.lang.String |
USE_CONTAINER_METAINF_CACHE |
ATTR
Constructor | Description |
---|---|
MetaInfConfiguration() |
Modifier and Type | Method | Description |
---|---|---|
java.util.Collection<java.net.URL> |
getTlds(java.io.File dir) |
Find all .tld files in all subdirs of the given dir.
|
java.util.Collection<java.net.URL> |
getTlds(java.net.URI uri) |
Find all .tld files in the given jar.
|
void |
postConfigure(WebAppContext context) |
Clear down after configuration.
|
void |
preConfigure(WebAppContext context) |
Set up for configuration.
|
void |
scanForFragment(WebAppContext context,
Resource jar,
java.util.concurrent.ConcurrentHashMap<Resource,Resource> cache) |
Scan for META-INF/web-fragment.xml file in the given jar.
|
void |
scanForResources(WebAppContext context,
Resource target,
java.util.concurrent.ConcurrentHashMap<Resource,Resource> cache) |
Scan for META-INF/resources dir in the given jar.
|
void |
scanForTlds(WebAppContext context,
Resource jar,
java.util.concurrent.ConcurrentHashMap<Resource,java.util.Collection<java.net.URL>> cache) |
Discover META-INF/*.tld files in the given jar
|
void |
scanJars(WebAppContext context,
java.util.Collection<Resource> jars,
boolean useCaches) |
For backwards compatibility.
|
void |
scanJars(WebAppContext context,
java.util.Collection<Resource> jars,
boolean useCaches,
java.util.List<java.lang.String> scanTypes) |
Look into the jars to discover info in META-INF.
|
cloneConfigure, configure, deconfigure, destroy
public static final java.lang.String USE_CONTAINER_METAINF_CACHE
public static final boolean DEFAULT_USE_CONTAINER_METAINF_CACHE
public static final java.lang.String CACHED_CONTAINER_TLDS
public static final java.lang.String CACHED_CONTAINER_FRAGMENTS
public static final java.lang.String CACHED_CONTAINER_RESOURCES
public static final java.lang.String METAINF_TLDS
public static final java.lang.String METAINF_FRAGMENTS
public static final java.lang.String METAINF_RESOURCES
public static final java.util.List<java.lang.String> __allScanTypes
public void preConfigure(WebAppContext context) throws java.lang.Exception
Configuration
Typically this step discovers configuration resources
preConfigure
in interface Configuration
preConfigure
in class AbstractConfiguration
context
- The context to configurejava.lang.Exception
- if unable to pre configurepublic void scanJars(WebAppContext context, java.util.Collection<Resource> jars, boolean useCaches) throws java.lang.Exception
context
- the context for the scanjars
- the jars to scanuseCaches
- if true, the scanned info is cachedjava.lang.Exception
- if unable to scan the jarspublic void scanJars(WebAppContext context, java.util.Collection<Resource> jars, boolean useCaches, java.util.List<java.lang.String> scanTypes) throws java.lang.Exception
context
- the context for the scanjars
- the jars resources to scanuseCaches
- if true, cache the info discoveredscanTypes
- the type of things to look for in the jarsjava.lang.Exception
- if unable to scan the jarspublic void scanForResources(WebAppContext context, Resource target, java.util.concurrent.ConcurrentHashMap<Resource,Resource> cache) throws java.lang.Exception
context
- the context for the scantarget
- the target resource to scan forcache
- the resource cachejava.lang.Exception
- if unable to scan for resourcespublic void scanForFragment(WebAppContext context, Resource jar, java.util.concurrent.ConcurrentHashMap<Resource,Resource> cache) throws java.lang.Exception
context
- the context for the scanjar
- the jar resource to scan for fragements incache
- the resource cachejava.lang.Exception
- if unable to scan for fragmentspublic void scanForTlds(WebAppContext context, Resource jar, java.util.concurrent.ConcurrentHashMap<Resource,java.util.Collection<java.net.URL>> cache) throws java.lang.Exception
context
- the context for the scanjar
- the jar resources to scan tlds forcache
- the resource cachejava.lang.Exception
- if unable to scan for tldspublic void postConfigure(WebAppContext context) throws java.lang.Exception
Configuration
postConfigure
in interface Configuration
postConfigure
in class AbstractConfiguration
context
- The context to configurejava.lang.Exception
- if unable to post configurepublic java.util.Collection<java.net.URL> getTlds(java.io.File dir) throws java.io.IOException
dir
- the directory to scanjava.io.IOException
- if unable to scan the directorypublic java.util.Collection<java.net.URL> getTlds(java.net.URI uri) throws java.io.IOException
uri
- the uri to jar filejava.io.IOException
- if unable to scan the jar fileCopyright © 1995–2018 Webtide. All rights reserved.