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

import com.yahoo.component.ComponentId;
import com.yahoo.component.chain.model.ChainSpecification;
import com.yahoo.vespa.model.container.component.chain.Chain;

/**
 * @author bjorncs
 */
public class HttpFilterChain extends Chain<Filter> {

    public enum Type { USER, SYSTEM }

    private final Type type;

    public HttpFilterChain(ChainSpecification inner, Type type) {
        super(inner);
        this.type = type;
    }

    public HttpFilterChain(ComponentId id, Type type) { this(FilterChains.emptyChainSpec(id), type); }
    public HttpFilterChain(String id, Type type) { this(ComponentId.fromString(id), type); }

    public Type type() { return type; }
    public String id() { return getComponentId().stringValue(); }
}