aboutsummaryrefslogtreecommitdiffstats
path: root/container-core/src/main/java/com/yahoo/component/chain/model/ChainedComponentModel.java
blob: 7e50592896b851f15c3fab975f1e4d5f9c96ca5f (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.component.chain.model;

import com.yahoo.container.bundle.BundleInstantiationSpecification;
import com.yahoo.component.chain.dependencies.Dependencies;
import com.yahoo.osgi.provider.model.ComponentModel;

/**
 * Describes how a chained component should be created. Immutable.
 *
 * @author Arne Bergene Fossaa
 * @author Tony Vaagenes
 */
public class ChainedComponentModel extends ComponentModel {
    public final Dependencies dependencies;

    public ChainedComponentModel(BundleInstantiationSpecification bundleInstantiationSpec, Dependencies dependencies,
                                 String configId) {
        super(bundleInstantiationSpec, configId);
        assert(dependencies != null);

        this.dependencies = dependencies;
    }

    public ChainedComponentModel(BundleInstantiationSpecification bundleInstantiationSpec, Dependencies dependencies) {
        this(bundleInstantiationSpec, dependencies, null);
    }

}