• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java FileSystemConfigBuilder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.commons.vfs2.FileSystemConfigBuilder的典型用法代码示例。如果您正苦于以下问题:Java FileSystemConfigBuilder类的具体用法?Java FileSystemConfigBuilder怎么用?Java FileSystemConfigBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FileSystemConfigBuilder类属于org.apache.commons.vfs2包,在下文中一共展示了FileSystemConfigBuilder类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: AbstractFileSystem

import org.apache.commons.vfs2.FileSystemConfigBuilder; //导入依赖的package包/类
protected AbstractFileSystem(final FileName rootName,
                             final FileObject parentLayer,
                             final FileSystemOptions fileSystemOptions)
{
    // this.parentLayer = parentLayer;
    this.parentLayer = parentLayer;
    this.rootName = rootName;
    this.fileSystemOptions = fileSystemOptions;
    FileSystemConfigBuilder builder = DefaultFileSystemConfigBuilder.getInstance();
    String uri = builder.getRootURI(fileSystemOptions);
    if (uri == null)
    {
        uri = rootName.getURI();
    }
    this.rootURI = uri;
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:17,代码来源:AbstractFileSystem.java


示例2: getConfigBuilder

import org.apache.commons.vfs2.FileSystemConfigBuilder; //导入依赖的package包/类
@Test
public void getConfigBuilder() throws FileSystemException {
  final AtomicBoolean called = new AtomicBoolean( false );
  String scheme = "scheme";
  HadoopConfiguration config =
    new HadoopConfiguration( VFS.getManager().resolveFile( "ram:///" ), "id", "name", new MockHadoopShim(), null,
      null, null );
  FileProvider provider = new MockFileProvider() {
    @Override
    public FileSystemConfigBuilder getConfigBuilder() {
      called.set( true );
      return null;
    }
  };

  HadoopConfigurationFileSystemManager fsm = createTestFileSystemManager( config, scheme, provider );
  ActiveHadoopShimFileProvider p = new ActiveHadoopShimFileProvider( fsm, scheme );
  p.getConfigBuilder();

  assertTrue( "Expected provider method not called", called.get() );
}
 
开发者ID:pentaho,项目名称:pentaho-hadoop-shims,代码行数:22,代码来源:ActiveHadoopShimFileProviderTest.java


示例3: createSchemeMethods

import org.apache.commons.vfs2.FileSystemConfigBuilder; //导入依赖的package包/类
/**
 * create the list of all set*() methods for the given scheme
 */
private Map<String, List<Method>> createSchemeMethods(String scheme) throws FileSystemException
{
    final FileSystemConfigBuilder fscb = getManager().getFileSystemConfigBuilder(scheme);
    if (fscb == null)
    {
        throw new FileSystemException("vfs.provider/no-config-builder.error", scheme);
    }

    Map<String, List<Method>> schemeMethods = new TreeMap<String, List<Method>>();

    Method[] methods = fscb.getClass().getMethods();
    for (int iterMethods = 0; iterMethods < methods.length; iterMethods++)
    {
        Method method = methods[iterMethods];
        if (!Modifier.isPublic(method.getModifiers()))
        {
            continue;
        }

        String methodName = method.getName();
        if (!methodName.startsWith("set"))
        {
            // not a setter
            continue;
        }

        String key = methodName.substring(3).toLowerCase();

        List<Method> configSetter = schemeMethods.get(key);
        if (configSetter == null)
        {
            configSetter = new ArrayList<Method>(2);
            schemeMethods.put(key, configSetter);
        }
        configSetter.add(method);
    }

    return schemeMethods;
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:43,代码来源:DelegatingFileSystemOptionsBuilder.java


示例4: getFileSystemConfigBuilder

import org.apache.commons.vfs2.FileSystemConfigBuilder; //导入依赖的package包/类
/**
 * Get the configuration builder for the given scheme.
 * @param scheme The scheme to locate.
 * @return The FileSystemConfigBuilder for the scheme.
 * @throws FileSystemException if the given scheme is not konwn
 */
public FileSystemConfigBuilder getFileSystemConfigBuilder(final String scheme)
        throws FileSystemException
{
    FileProvider provider = providers.get(scheme);
    if (provider == null)
    {
        throw new FileSystemException("vfs.impl/unknown-scheme.error", new Object[] {scheme});
    }

    return provider.getConfigBuilder();
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:18,代码来源:DefaultFileSystemManager.java


示例5: getConfigBuilder

import org.apache.commons.vfs2.FileSystemConfigBuilder; //导入依赖的package包/类
@Override
public FileSystemConfigBuilder getConfigBuilder() {
  try {
    return fsm.getActiveFileProvider( scheme ).getConfigBuilder();
  } catch ( FileSystemException e ) {
    return null;
  }
}
 
开发者ID:pentaho,项目名称:pentaho-hadoop-shims,代码行数:9,代码来源:ActiveHadoopShimFileProvider.java


示例6: getFileSystemConfigBuilder

import org.apache.commons.vfs2.FileSystemConfigBuilder; //导入依赖的package包/类
@Override
public FileSystemConfigBuilder getFileSystemConfigBuilder( String scheme ) throws FileSystemException {
  lock.readLock().lock();
  try {
    return super.getFileSystemConfigBuilder( scheme );
  } finally {
    lock.readLock().unlock();
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:10,代码来源:ConcurrentFileSystemManager.java


示例7: getConfigBuilder

import org.apache.commons.vfs2.FileSystemConfigBuilder; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public FileSystemConfigBuilder getConfigBuilder() {
    return GsiFtpFileSystemConfigBuilder.getInstance();
}
 
开发者ID:clstoulouse,项目名称:motu,代码行数:6,代码来源:GsiFtpFileProvider.java


示例8: getConfigBuilder

import org.apache.commons.vfs2.FileSystemConfigBuilder; //导入依赖的package包/类
public FileSystemConfigBuilder getConfigBuilder() {
  // not needed for our usage
  return null;
}
 
开发者ID:pentaho,项目名称:pentaho-osgi-bundles,代码行数:5,代码来源:MetadataToMondrianVfs.java


示例9: getConfigBuilder

import org.apache.commons.vfs2.FileSystemConfigBuilder; //导入依赖的package包/类
@Override
public FileSystemConfigBuilder getConfigBuilder()
{
    return FtpFileSystemConfigBuilder.getInstance();
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:6,代码来源:FtpFileProvider.java


示例10: getConfigBuilder

import org.apache.commons.vfs2.FileSystemConfigBuilder; //导入依赖的package包/类
@Override
public FileSystemConfigBuilder getConfigBuilder()
{
    return SftpFileSystemConfigBuilder.getInstance();
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:6,代码来源:SftpFileProvider.java


示例11: getConfigBuilder

import org.apache.commons.vfs2.FileSystemConfigBuilder; //导入依赖的package包/类
@Override
public FileSystemConfigBuilder getConfigBuilder()
{
    return HttpFileSystemConfigBuilder.getInstance();
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:6,代码来源:HttpFileProvider.java


示例12: getConfigBuilder

import org.apache.commons.vfs2.FileSystemConfigBuilder; //导入依赖的package包/类
@Override
public FileSystemConfigBuilder getConfigBuilder()
{
    return org.apache.commons.vfs2.provider.res.ResourceFileSystemConfigBuilder.getInstance();
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:6,代码来源:UrlFileProvider.java


示例13: getConfigBuilder

import org.apache.commons.vfs2.FileSystemConfigBuilder; //导入依赖的package包/类
@Override
public FileSystemConfigBuilder getConfigBuilder()
{
    return WebdavFileSystemConfigBuilder.getInstance();
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:6,代码来源:WebdavFileProvider.java


示例14: getConfigBuilder

import org.apache.commons.vfs2.FileSystemConfigBuilder; //导入依赖的package包/类
@Override
public FileSystemConfigBuilder getConfigBuilder()
{
    return FtpsFileSystemConfigBuilder.getInstance();
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:6,代码来源:FtpsFileProvider.java


示例15: getConfigBuilder

import org.apache.commons.vfs2.FileSystemConfigBuilder; //导入依赖的package包/类
/**
 * Returns the FileSystemConfigBuidler.
 * @return the FileSystemConfigBuilder.
 */
public FileSystemConfigBuilder getConfigBuilder()
{
    return null;
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:9,代码来源:AbstractFileProvider.java


示例16: getConfigBuilder

import org.apache.commons.vfs2.FileSystemConfigBuilder; //导入依赖的package包/类
@Override
public FileSystemConfigBuilder getConfigBuilder() {
  // TODO Auto-generated method stub
  return null;
}
 
开发者ID:pentaho,项目名称:pentaho-hadoop-shims,代码行数:6,代码来源:MockFileProvider.java


示例17: getConfigBuilder

import org.apache.commons.vfs2.FileSystemConfigBuilder; //导入依赖的package包/类
@Override
public FileSystemConfigBuilder getConfigBuilder() {
  throw new NotImplementedException();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:5,代码来源:RepositoryVfsProvider.java


示例18: getConfigBuilder

import org.apache.commons.vfs2.FileSystemConfigBuilder; //导入依赖的package包/类
/**
 * Gets the configbuilder useable to collect the needed fileSystemOptions.
 * @return a FileSystemConfigBuilder for the particular file system.
 */
FileSystemConfigBuilder getConfigBuilder();
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:6,代码来源:FileProvider.java



注:本文中的org.apache.commons.vfs2.FileSystemConfigBuilder类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ManagedResource类代码示例发布时间:2022-05-23
下一篇:
Java BindingProvider类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap