Package org.apache.commons.vfs2.impl
Class StandardFileSystemManager
- java.lang.Object
-
- org.apache.commons.vfs2.impl.DefaultFileSystemManager
-
- org.apache.commons.vfs2.impl.StandardFileSystemManager
-
- All Implemented Interfaces:
FileSystemManager
public class StandardFileSystemManager extends DefaultFileSystemManager
AFileSystemManager
that configures itself from an XML (Default: providers.xml) configuration file.Certain providers are only loaded and available if the dependent library is in your classpath. You have to configure your debugging facility to log "debug" messages to see if a provider was skipped due to "unresolved externals".
-
-
Constructor Summary
Constructors Constructor Description StandardFileSystemManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
configurePlugins()
Scans the classpath to find any droped plugin.protected DefaultFileReplicator
createDefaultFileReplicator()
void
init()
Initializes this manager.void
setClassLoader(java.lang.ClassLoader classLoader)
Sets the ClassLoader to use to load the providers.void
setConfiguration(java.lang.String configUri)
Sets the configuration file for this manager.void
setConfiguration(java.net.URL configUri)
Sets the configuration file for this manager.-
Methods inherited from class org.apache.commons.vfs2.impl.DefaultFileSystemManager
_closeFileSystem, addExtensionMap, addMimeTypeMap, addOperationProvider, addOperationProvider, addProvider, addProvider, canCreateFileSystem, close, closeFileSystem, createFileSystem, createFileSystem, createVirtualFileSystem, createVirtualFileSystem, freeUnusedResources, getBaseFile, getCacheStrategy, getFileContentInfoFactory, getFileObjectDecorator, getFileObjectDecoratorConst, getFilesCache, getFileSystemConfigBuilder, getLogger, getOperationProviders, getProviderCapabilities, getReplicator, getSchemes, getTemporaryFileStore, getURLStreamHandlerFactory, hasProvider, resolveFile, resolveFile, resolveFile, resolveFile, resolveFile, resolveFile, resolveFile, resolveName, resolveName, resolveURI, setBaseFile, setBaseFile, setCacheStrategy, setDefaultProvider, setFileContentInfoFactory, setFileObjectDecorator, setFilesCache, setLogger, setReplicator, setTemporaryFileStore, toFileObject
-
-
-
-
Constructor Detail
-
StandardFileSystemManager
public StandardFileSystemManager()
-
-
Method Detail
-
setConfiguration
public void setConfiguration(java.lang.String configUri)
Sets the configuration file for this manager.- Parameters:
configUri
- The URI for this manager.
-
setConfiguration
public void setConfiguration(java.net.URL configUri)
Sets the configuration file for this manager.- Parameters:
configUri
- The URI forthis manager.
-
setClassLoader
public void setClassLoader(java.lang.ClassLoader classLoader)
Sets the ClassLoader to use to load the providers. Default is to use the ClassLoader that loaded this class.- Parameters:
classLoader
- The ClassLoader.
-
init
public void init() throws FileSystemException
Initializes this manager. Adds the providers and replicator.- Overrides:
init
in classDefaultFileSystemManager
- Throws:
FileSystemException
- if an error occurs.
-
configurePlugins
protected void configurePlugins() throws FileSystemException
Scans the classpath to find any droped plugin.The plugin-description has to be in
/META-INF/vfs-providers.xml
.- Throws:
FileSystemException
- if an error occurs.
-
createDefaultFileReplicator
protected DefaultFileReplicator createDefaultFileReplicator()
-
-