public class NioBasedJndiLoader extends JndiLoader
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
NioBasedJndiLoader.MySimpleFileVisitor |
| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOGGER |
COLON_REPLACE, DELIMITER, environment, FILENAME_TO_CONTEXT| Constructor and Description |
|---|
NioBasedJndiLoader(Hashtable env) |
| Modifier and Type | Method and Description |
|---|---|
void |
load(File fileOrDirectory,
Context ctxt,
boolean preserveRootFileNameAsContextName) |
private void |
loadDirectory(File directory,
String platformSpecificRootDir,
Context ctxt,
Context parentCtxt,
String subName)
Loads all .properties", .ini, .xml files in a directory into a context.
|
private void |
loadFile(Path path,
Context ctxt,
Context parentCtxt,
boolean preserveFileNameAsContextName) |
void |
loadJar(File jarFile,
String rootDir,
Context ctxt,
boolean preserveFileNameAsContextName) |
Properties |
toProperties(Path path) |
createSubContexts, extractContextName, extractObjectName, extractTypedProperties, getTypeDefinition, handleColonReplacement, isNotNamespacedTypeDefinition, isSupportedFile, load, load, processType, toCompoundNamepublic NioBasedJndiLoader(Hashtable env)
public void load(File fileOrDirectory, Context ctxt, boolean preserveRootFileNameAsContextName) throws NamingException, IOException
fileOrDirectory - Not a jar file. To load jar files use loadJar(File, String, Context, boolean)preserveRootFileNameAsContextName - true: If fileOrDirectory is a file, the file's name is taken as context name. This rule is only applied to files which are root files. Files found while traversing directories will always result in subcontexts named as the file. The only exception are files named "default".NamingExceptionIOExceptionpublic void loadJar(File jarFile, String rootDir, Context ctxt, boolean preserveFileNameAsContextName) throws IOException
rootDir - name-separator has to be platform independent always "/"preserveFileNameAsContextName - Siehe load(File, Context, boolean)IOExceptionprivate void loadFile(Path path, Context ctxt, Context parentCtxt, boolean preserveFileNameAsContextName) throws IOException, NamingException
preserveFileNameAsContextName - Siehe load(File, Context, boolean). Can be false in case of root files.IOExceptionNamingExceptionpublic Properties toProperties(Path path) throws IOException
IOExceptionprivate void loadDirectory(File directory, String platformSpecificRootDir, Context ctxt, Context parentCtxt, String subName) throws NamingException, IOException
NamingExceptionIOExceptionCopyright © 2020. All rights reserved.