public class WebDirContext extends FileDirContext
Modifier and Type | Class and Description |
---|---|
protected static class |
WebDirContext.JarFileEntry |
protected static class |
WebDirContext.JarResource
This specialized resource implementation avoids opening the InputStream
to the jar entry right away (which would put a lock on the jar file).
|
protected static class |
WebDirContext.JarResourceAttributes
This specialized resource attribute implementation does some lazy
reading (to speed up simple checks, like checking the last modified
date).
|
FileDirContext.FileResource, FileDirContext.FileResourceAttributes
Modifier and Type | Field and Description |
---|---|
protected JarFileResourcesProvider |
jarFileResourcesProvider |
protected String |
jarResourceBase |
protected static String |
META_INF_RESOURCES |
absoluteBase, allowLinking, base, BUFFER_SIZE, caseSensitive, docBaseFileCache, fileCache, listFileCache, rb
cached, cacheMaxSize, cacheTTL, debug, docBase, env
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES
Constructor and Description |
---|
WebDirContext()
Builds a file directory context using the given environment.
|
WebDirContext(Hashtable<String,Object> env)
Builds a file directory context using the given environment.
|
Modifier and Type | Method and Description |
---|---|
protected String |
getAbsoluteJarResourceName(String name) |
Attributes |
getAttributes(String name,
String[] attrIds)
Retrieves selected attributes associated with a named object.
|
NamingEnumeration<NameClassPair> |
list(String name)
Enumerates the names bound in the named context, along with the class
names of objects bound to them.
|
protected List<NamingEntry> |
list(WebDirContext.JarFileEntry jfeEntry) |
NamingEnumeration<Binding> |
listBindings(String name)
Enumerates the names bound in the named context, along with the
objects bound to them.
|
Object |
lookup(String name)
Retrieves the named object.
|
protected List<WebDirContext.JarFileEntry> |
lookupAllFromJars(String name) |
protected WebDirContext.JarFileEntry |
lookupFromJars(String name) |
void |
release()
Release any resources allocated for this directory context.
|
void |
setJarFileResourcesProvider(JarFileResourcesProvider jarFileResourcesProvider) |
bind, createSubcontext, destroySubcontext, file, getAllowLinking, getNameInNamespace, getSchema, getSchemaClassDefinition, isCaseSensitive, list, lookupLink, modifyAttributes, modifyAttributes, normalize, rebind, rebind, rename, search, search, search, search, setAllowLinking, setCaseSensitive, setDocBase, unbind
addToEnvironment, allocate, bind, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, createSubcontext, destroySubcontext, getAttributes, getAttributes, getAttributes, getCacheMaxSize, getCacheTTL, getDebug, getDocBase, getEnvironment, getNameParser, getNameParser, getSchema, getSchemaClassDefinition, isCached, list, listBindings, lookup, lookupLink, modifyAttributes, modifyAttributes, rebind, rebind, rebind, removeFromEnvironment, rename, search, search, search, search, setCached, setCacheMaxSize, setCacheTTL, setDebug, unbind
protected static final String META_INF_RESOURCES
protected JarFileResourcesProvider jarFileResourcesProvider
protected String jarResourceBase
public WebDirContext()
public void setJarFileResourcesProvider(JarFileResourcesProvider jarFileResourcesProvider)
public void release()
release
in class FileDirContext
public Object lookup(String name) throws NamingException
lookup
in interface Context
lookup
in class FileDirContext
name
- the name of the object to look upNamingException
- if a naming exception is encounteredpublic NamingEnumeration<NameClassPair> list(String name) throws NamingException
If a binding is added to or removed from this context, its effect on an enumeration previously returned is undefined.
list
in interface Context
list
in class FileDirContext
name
- the name of the context to listNamingException
- if a naming exception is encounteredpublic NamingEnumeration<Binding> listBindings(String name) throws NamingException
If a binding is added to or removed from this context, its effect on an enumeration previously returned is undefined.
listBindings
in interface Context
listBindings
in class FileDirContext
name
- the name of the context to listNamingException
- if a naming exception is encounteredpublic Attributes getAttributes(String name, String[] attrIds) throws NamingException
getAttributes
in interface DirContext
getAttributes
in class FileDirContext
name
- the name of the object from which to retrieve attributesattrIds
- the identifiers of the attributes to retrieve. null
indicates that all attributes should be retrieved; an empty array
indicates that none should be retrievedNamingException
- if a naming exception is encounteredprotected WebDirContext.JarFileEntry lookupFromJars(String name)
protected List<WebDirContext.JarFileEntry> lookupAllFromJars(String name)
protected List<NamingEntry> list(WebDirContext.JarFileEntry jfeEntry)
Copyright © 2020. All rights reserved.