org.restlet.resource.Directory.setDeeplyAccessible()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(131)

本文整理了Java中org.restlet.resource.Directory.setDeeplyAccessible()方法的一些代码示例,展示了Directory.setDeeplyAccessible()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Directory.setDeeplyAccessible()方法的具体详情如下:
包路径:org.restlet.resource.Directory
类名称:Directory
方法名:setDeeplyAccessible

Directory.setDeeplyAccessible介绍

[英]Indicates if the sub-directories are deeply accessible (true by default).
[中]指示子目录是否可深度访问(默认为true)。

代码示例

代码示例来源:origin: stackoverflow.com

final Component component = new Component();
component.getClients().add(Protocol.CLAP);
final Directory dir = new Directory(component.getContext(), "clap://class/META-INF/resources/webjars");
dir.setDeeplyAccessible(true);
this.attach("/webjars", dir);
//access via http://example.com/webjars/jquery/1.9.0/jquery.min.js

代码示例来源:origin: gofore/aws-training

private Directory rootTarget() {
  Directory directory = new UtfDirectory(getContext(), "clap://class/static/");
  directory.setDeeplyAccessible(true);
  directory.setIndexName(INDEX);
  return directory;
}

代码示例来源:origin: org.restlet.jse/org.restlet.example

@Override
  public Restlet createInboundRoot() {
    getConnectorService().getClientProtocols().add(Protocol.CLAP);
    getConnectorService().getServerProtocols().add(Protocol.HTTP);
    final Directory directory = new Directory(getContext(),
        "clap://class");
    directory.setListingAllowed(true);
    directory.setDeeplyAccessible(true);
    return directory;
  }
};

代码示例来源:origin: org.restlet.osgi/org.restlet.ext.osgi

/**
 * Creates the Restlet Directory instance using the rootUri, indexName,
 * deeplyAccessible, modifiable, and negotiatingContent service properties
 * 
 * @param context
 *            the Restlet application context
 * @return the configured Restlet Directory
 */
protected Directory createDirectory(Context context) {
  Directory directory = new Directory(context, rootUri);
  directory.setIndexName(indexName);
  directory.setDeeplyAccessible(deeplyAccessible);
  directory.setModifiable(modifiable);
  directory.setNegotiatingContent(negotiatingContent);
  return directory;
}

相关文章