All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yahoo.vespa.configserver.flags.http.FlagDataResponse Maven / Gradle / Ivy

There is a newer version: 8.444.18
Show newest version
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.configserver.flags.http;

import com.yahoo.container.jdisc.HttpResponse;
import com.yahoo.jdisc.Response;
import com.yahoo.vespa.flags.json.FlagData;

import java.io.OutputStream;

/**
 * @author hakonhall
 */
public class FlagDataResponse extends HttpResponse {
    private final FlagData data;

    FlagDataResponse(FlagData data) {
        super(Response.Status.OK);
        this.data = data;
    }

    @Override
    public void render(OutputStream outputStream) {
        data.serializeToOutputStream(outputStream);
    }

    @Override
    public String getContentType() {
        return "application/json";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy