Top Description Fields Constructors Methods
org.apache.catalina.webresources

public abstract Class AbstractSingleArchiveResourceSet

extends AbstractArchiveResourceSet
Class Inheritance
Known Direct Subclasses
org.apache.catalina.webresources.JarResourceSet, org.apache.catalina.webresources.WarResourceSet
Imports
java.io.File, .IOException, java.net.MalformedURLException, java.util.Enumeration, .HashMap, .Map, java.util.jar.JarEntry, .JarFile, java.util.zip.ZipFile, org.apache.catalina.LifecycleException, .WebResourceRoot, org.apache.tomcat.util.buf.UriUtil

Base class for a org.apache.catalina.WebResourceSet based on a single, rather than nested, archive.

Field Summary

Modifier and TypeField and Description
private volatile Boolean
Inherited from org.apache.catalina.webresources.AbstractArchiveResourceSet:
archiveEntriesarchiveLock

Constructor Summary

AccessConstructor and Description
public
AbstractSingleArchiveResourceSet()

A no argument constructor is required for this to work with the digester.

public
AbstractSingleArchiveResourceSet(WebResourceRoot root, String webAppMount, String base, String internalPath)

Method Summary

Modifier and TypeMethod and Description
protected Map<String, JarEntry>
getArchiveEntries(boolean
Is this request being make to support a single lookup? If false, a map will always be returned. If true, implementations may use this as a hint in determining the optimum way to respond.
single
)

Implements abstract org.apache.catalina.webresources.AbstractArchiveResourceSet.getArchiveEntries.

Obtain the map of entries in the archive.

protected JarEntry
getArchiveEntry(String
The path in the archive of the entry required
pathInArchive
)

Implements abstract org.apache.catalina.webresources.AbstractArchiveResourceSet.getArchiveEntry.

Obtain a single entry from the archive.

protected void
initInternal()

Implements abstract org.apache.catalina.util.LifecycleBase.initInternal.

Sub-classes implement this method to perform any instance initialisation required.

protected boolean
Inherited from org.apache.catalina.webresources.AbstractArchiveResourceSet:
closeJarFilecreateArchiveResourcegcgetBaseUrlgetBaseUrlStringgetResourceisReadOnlylistlistWebAppPathsmkdiropenJarFilesetBaseUrlsetReadOnlywrite

Field Detail

multiReleaseback to summary
private volatile Boolean multiRelease

Constructor Detail

AbstractSingleArchiveResourceSetback to summary
public AbstractSingleArchiveResourceSet()

A no argument constructor is required for this to work with the digester.

AbstractSingleArchiveResourceSetback to summary
public AbstractSingleArchiveResourceSet(WebResourceRoot root, String webAppMount, String base, String internalPath) throws IllegalArgumentException

Method Detail

getArchiveEntriesback to summary
protected Map<String, JarEntry> getArchiveEntries(boolean single)

Implements abstract org.apache.catalina.webresources.AbstractArchiveResourceSet.getArchiveEntries.

Doc from org.apache.catalina.webresources.AbstractArchiveResourceSet.getArchiveEntries.

Obtain the map of entries in the archive. May return null in which case getArchiveEntry(String) should be used.

Parameters
single:boolean

Is this request being make to support a single lookup? If false, a map will always be returned. If true, implementations may use this as a hint in determining the optimum way to respond.

Returns:Map<String, JarEntry>

The archives entries mapped to their names or null if getArchiveEntry(String) should be used.

Annotations
@Override
getArchiveEntryback to summary
protected JarEntry getArchiveEntry(String pathInArchive)

Implements abstract org.apache.catalina.webresources.AbstractArchiveResourceSet.getArchiveEntry.

Doc from org.apache.catalina.webresources.AbstractArchiveResourceSet.getArchiveEntry.

Obtain a single entry from the archive. For performance reasons, getArchiveEntries(boolean) should always be called first and the archive entry looked up in the map if one is returned. Only if that call returns null should this method be used.

Parameters
pathInArchive:String

The path in the archive of the entry required

Returns:JarEntry

The specified archive entry or null if it does not exist

Annotations
@Override
initInternalback to summary
protected void initInternal() throws LifecycleException

Implements abstract org.apache.catalina.util.LifecycleBase.initInternal.

Doc from org.apache.catalina.util.LifecycleBase.initInternal.

Sub-classes implement this method to perform any instance initialisation required.

Annotations
@Override
Exceptions
LifecycleException:
If the initialisation fails
isMultiReleaseback to summary
protected boolean isMultiRelease()

Implements abstract org.apache.catalina.webresources.AbstractArchiveResourceSet.isMultiRelease.

Annotations
@Override