public class DelegatingFileSystemOptionsBuilder extends Object
Example:
FileSystemOptions fso = new FileSystemOptions(); DelegatingFileSystemOptionsBuilder delegate = new DelegatingFileSystemOptionsBuilder(VFS.getManager()); delegate.setConfigString(fso, "sftp", "identities", "c:/tmp/test.ident"); delegate.setConfigString(fso, "http", "proxyPort", "8080"); delegate.setConfigClass(fso, "sftp", "userinfo", TrustEveryoneUserInfo.class);
Constructor and Description |
---|
DelegatingFileSystemOptionsBuilder(FileSystemManager manager)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected FileSystemManager |
getManager() |
void |
setConfigClass(FileSystemOptions fso,
String scheme,
String name,
Class<?> className)
Sets a single class value.
|
void |
setConfigClasses(FileSystemOptions fso,
String scheme,
String name,
Class<?>[] classNames)
Sets an array of class values.
|
void |
setConfigString(FileSystemOptions fso,
String scheme,
String name,
String value)
Sets a single string value.
|
void |
setConfigStrings(FileSystemOptions fso,
String scheme,
String name,
String[] values)
Sets an array of string value.
|
public DelegatingFileSystemOptionsBuilder(FileSystemManager manager)
Pass in your fileSystemManager instance.
manager
- the manager to use to get the fileSystemConfigBuilder assocated to a schemeprotected FileSystemManager getManager()
public void setConfigString(FileSystemOptions fso, String scheme, String name, String value) throws FileSystemException
fso
- FileSystemOptionsscheme
- schemename
- namevalue
- valueFileSystemException
- if an error occurs.public void setConfigStrings(FileSystemOptions fso, String scheme, String name, String[] values) throws FileSystemException
fso
- FileSystemOptionsscheme
- schemename
- namevalues
- valuesFileSystemException
- if an error occurs.public void setConfigClass(FileSystemOptions fso, String scheme, String name, Class<?> className) throws FileSystemException, IllegalAccessException, InstantiationException
The class has to implement a no-args constructor, else the instantiation might fail.
fso
- FileSystemOptionsscheme
- schemename
- nameclassName
- classNameFileSystemException
- if an error occurs.IllegalAccessException
- if a class canoot be accessed.InstantiationException
- if a class cannot be instantiated.public void setConfigClasses(FileSystemOptions fso, String scheme, String name, Class<?>[] classNames) throws FileSystemException, IllegalAccessException, InstantiationException
The class has to implement a no-args constructor, else the instantiation might fail.
fso
- FileSystemOptionsscheme
- schemename
- nameclassNames
- classNamesFileSystemException
- if an error occurs.IllegalAccessException
- if a class canoot be accessed.InstantiationException
- if a class cannot be instantiated.Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.