Search in sources :

Example 6 with Handler

use of com.yahoo.vespa.model.container.component.Handler in project vespa by vespa-engine.

the class ContainerDocumentApiBuilderTest method getHandlers.

private Map<String, Handler<?>> getHandlers(String clusterName) {
    ContainerCluster cluster = (ContainerCluster) root.getChildren().get(clusterName);
    Map<String, Handler<?>> handlerMap = new HashMap<>();
    Collection<Handler<?>> handlers = cluster.getHandlers();
    for (Handler<?> handler : handlers) {
        // die on overwrites
        assertThat(handlerMap.containsKey(handler.getComponentId().toString()), is(false));
        handlerMap.put(handler.getComponentId().toString(), handler);
    }
    return handlerMap;
}
Also used : HashMap(java.util.HashMap) ContainerCluster(com.yahoo.vespa.model.container.ContainerCluster) Handler(com.yahoo.vespa.model.container.component.Handler)

Aggregations

Handler (com.yahoo.vespa.model.container.component.Handler)6 JerseyHandler (com.yahoo.vespa.model.container.jersey.JerseyHandler)4 AbstractConfigProducer (com.yahoo.config.model.producer.AbstractConfigProducer)3 StateHandler (com.yahoo.container.jdisc.state.StateHandler)3 BindingsOverviewHandler (com.yahoo.container.usability.BindingsOverviewHandler)3 ComponentModel (com.yahoo.osgi.provider.model.ComponentModel)3 ProcessingHandler (com.yahoo.vespa.model.container.component.chain.ProcessingHandler)3 DomBuilderTest (com.yahoo.config.model.builder.xml.test.DomBuilderTest)2 Test (org.junit.Test)2 JdiscBindingsConfig (com.yahoo.container.jdisc.JdiscBindingsConfig)1 ContainerCluster (com.yahoo.vespa.model.container.ContainerCluster)1 HashMap (java.util.HashMap)1 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)1 Element (org.w3c.dom.Element)1