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

com.yahoo.processing.handler.ResponseHeaders Maven / Gradle / Ivy

There is a newer version: 8.458.13
Show newest version
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.processing.handler;

import com.google.common.collect.ImmutableMap;
import com.yahoo.processing.Request;
import com.yahoo.processing.response.AbstractData;

import java.util.Collections;
import java.util.List;
import java.util.Map;

/**
 * Holds a set of headers which will be added to the Processing response.
 * A Response may contain multiple such data objects, and all of them will be added to the response.
 *
 * @author bratseth
 * @since  5.1.23
 */
public class ResponseHeaders extends AbstractData {

    private final Map> headers;

    /**
     * Creates a response headers object with a set of headers.
     *
     * @param headers the headers to copy into this object
     */
    public ResponseHeaders(Map> headers, Request request) {
        super(request);
        this.headers = ImmutableMap.copyOf(headers);
    }

    /** Returns an unmodifiable map of the response headers of this */
    public Map> headers() { return headers; }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy