blob: 52bb7b917818e94b0de295d84ed898c00a66c5c7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.model.container.component.chain;
import com.yahoo.container.bundle.BundleInstantiationSpecification;
import com.yahoo.container.core.ChainsConfig;
import com.yahoo.osgi.provider.model.ComponentModel;
import com.yahoo.config.model.producer.AbstractConfigProducer;
import com.yahoo.vespa.model.container.component.Handler;
/**
* Represents a handler for processing chains.
*
* @author gjoranv
* @since 5.1.7
*/
public class ProcessingHandler<CHAINS extends Chains<?>>
extends Handler<AbstractConfigProducer<?>>
implements ChainsConfig.Producer {
protected final CHAINS chains;
public ProcessingHandler(CHAINS chains, String handlerClass) {
super(new ComponentModel(BundleInstantiationSpecification.getInternalProcessingSpecificationFromStrings(handlerClass, null), null));
this.chains = chains;
}
@Override
public void getConfig(ChainsConfig.Builder builder) {
chains.getConfig(builder);
}
}
|