summaryrefslogtreecommitdiffstats
path: root/config/src/main/java/com/yahoo/config/subscription/FileSource.java
blob: bbad7286b4c115425933a06b34ffcbb7af1472fd (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config.subscription;

import java.io.File;

/**
 * Source specifying config from one local file
 *
 * @author Vegard Havdal
 * @deprecated  Will be removed in Vespa 8. Only for internal use.
 */
@Deprecated(forRemoval = true, since = "7")
public class FileSource implements ConfigSource {

    private final File file;

    public FileSource(File file) {
        if ( ! file.isFile()) throw new IllegalArgumentException("Not an ordinary file: "+file);
        this.file = file;
    }

    public File getFile() {
        return file;
    }

}