use of org.aesh.command.impl.registry.AeshCommandRegistryBuilder in project infinispan by infinispan.
the class CLI method initialCommandRuntimeBuilder.
private static AeshCommandRuntimeBuilder initialCommandRuntimeBuilder(Shell shell, Properties properties, boolean kube) throws CommandRegistryException {
AeshCommandRegistryBuilder registryBuilder = AeshCommandRegistryBuilder.builder();
Context context;
if (kube) {
context = new KubernetesContext(properties);
registryBuilder.command(Kube.class);
} else {
context = new ContextImpl(properties);
registryBuilder.command(CLI.class);
}
AeshCommandRuntimeBuilder runtimeBuilder = AeshCommandRuntimeBuilder.builder();
runtimeBuilder.commandActivatorProvider(new ContextAwareCommandActivatorProvider(context)).commandInvocationProvider(new ContextAwareCommandInvocationProvider(context)).commandNotFoundHandler(new CliCommandNotFoundHandler()).completerInvocationProvider(new ContextAwareCompleterInvocationProvider(context)).shell(shell).aeshContext(context).commandRegistry(registryBuilder.create());
return runtimeBuilder;
}
Aggregations