use of com.yahoo.processing.execution.chain.ChainRegistry in project vespa by vespa-engine.
the class MockUserDatabaseClientTest method setupJDisc.
private void setupJDisc(Collection<Chain<Processor>> chains) {
driver = TestDriver.newSimpleApplicationInstanceWithoutOsgi();
ContainerBuilder builder = driver.newContainerBuilder();
ChainRegistry<Processor> registry = new ChainRegistry<>();
for (Chain<Processor> chain : chains) registry.register(chain.getId(), chain);
builder.clientBindings().bind("pio://endpoint/*", new MockUserDatabaseRequestHandler());
driver.activateContainer(builder);
}
use of com.yahoo.processing.execution.chain.ChainRegistry in project vespa by vespa-engine.
the class FilterChainRepository method buildChainRegistry.
private static ChainRegistry<FilterWrapper> buildChainRegistry(ChainsConfig chainsConfig, ComponentRegistry<?>... filters) {
ChainRegistry<FilterWrapper> chainRegistry = new ChainRegistry<>();
ChainsModel chainsModel = ChainsModelBuilder.buildFromConfig(chainsConfig);
ChainsConfigurer.prepareChainRegistry(chainRegistry, chainsModel, allFiltersWrapped(filters));
chainRegistry.freeze();
return chainRegistry;
}
use of com.yahoo.processing.execution.chain.ChainRegistry in project vespa by vespa-engine.
the class ProcessingTestDriver method createProcessingHandler.
private static ProcessingHandler createProcessingHandler(Collection<Chain<Processor>> chains, ComponentRegistry<Renderer> renderers, AccessLog accessLog) {
Executor executor = Executors.newSingleThreadExecutor();
ChainRegistry<Processor> registry = new ChainRegistry<>();
for (Chain<Processor> chain : chains) registry.register(chain.getId(), chain);
return new ProcessingHandler(registry, renderers, executor, accessLog);
}
use of com.yahoo.processing.execution.chain.ChainRegistry in project vespa by vespa-engine.
the class ApplicationStatusHandlerTest method chains_are_rendered.
@Test
public void chains_are_rendered() throws Exception {
ChainRegistry<Processor> chains = new ChainRegistry<>();
Chain<Processor> chain = new Chain<Processor>("myChain", new VoidProcessor(new ComponentId("voidProcessor")));
chains.register(new ComponentId("myChain"), chain);
String json = ApplicationStatusHandler.StatusResponse.renderChains(chains).toString();
assertThat(json, containsString("myChain"));
assertThat(json, containsString("voidProcessor"));
}
Aggregations