本文整理汇总了Java中org.crsh.vfs.FS类的典型用法代码示例。如果您正苦于以下问题:Java FS类的具体用法?Java FS怎么用?Java FS使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FS类属于org.crsh.vfs包,在下文中一共展示了FS类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.crsh.vfs.FS; //导入依赖的package包/类
@PostConstruct
public void init() {
FS commandFileSystem = createFileSystem(
this.properties.getCommandPathPatterns(),
this.properties.getDisabledCommands());
FS configurationFileSystem = createFileSystem(
this.properties.getConfigPathPatterns(), new String[0]);
PluginDiscovery discovery = new BeanFactoryFilteringPluginDiscovery(
this.resourceLoader.getClassLoader(), this.beanFactory,
this.properties.getDisabledPlugins());
PluginContext context = new PluginContext(discovery,
createPluginContextAttributes(), commandFileSystem,
configurationFileSystem, this.resourceLoader.getClassLoader());
context.refresh();
start(context);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:20,代码来源:CrshAutoConfiguration.java
示例2: createFileSystem
import org.crsh.vfs.FS; //导入依赖的package包/类
protected FS createFileSystem(String[] pathPatterns, String[] filterPatterns) {
Assert.notNull(pathPatterns, "PathPatterns must not be null");
Assert.notNull(filterPatterns, "FilterPatterns must not be null");
FS fileSystem = new FS();
for (String pathPattern : pathPatterns) {
try {
fileSystem.mount(new SimpleFileSystemDriver(new DirectoryHandle(
pathPattern, this.resourceLoader, filterPatterns)));
}
catch (IOException ex) {
throw new IllegalStateException(
"Failed to mount file system for '" + pathPattern + "'", ex);
}
}
return fileSystem;
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:17,代码来源:CrshAutoConfiguration.java
示例3: start
import org.crsh.vfs.FS; //导入依赖的package包/类
public PluginContext start(final ClassLoader loader, final Properties props,
final Map<String, Object> attributes, final Set<CRaSHPlugin<?>> plugins) throws IOException {
FS conffs = newFS(CrashFSDriver.parse(loader, asList(new CrashPredicate("crash", ACCEPT))));
FS cmdfs = newFS(CrashFSDriver.parse(loader, asList(
new CrashPredicate("cmd", ACCEPT),
new CrashPredicate("org/jooby/crash", ACCEPT),
new CrashPredicate("crash/commands",
noneOf("jndi.groovy", "jdbc.groovy", "jpa.groovy", "jul.groovy")))));
setConfig(props);
PluginContext ctx = new PluginContext(executor("crash"), scanner("crash-scanner"),
() -> plugins, attributes, cmdfs, conffs, loader);
ctx.refresh();
start(ctx);
return ctx;
}
示例4: newFS
import org.crsh.vfs.FS; //导入依赖的package包/类
private FS newFS(final List<CrashFSDriver> drivers) throws IOException {
FS fs = new FS();
for (CrashFSDriver driver : drivers) {
fs.mount(driver);
}
this.drivers.addAll(drivers);
return fs;
}