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

org.analogweb.Headers Maven / Gradle / Ivy

The newest version!
package org.analogweb;

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

/**
 * Request or response header.
 *
 * @author y2k2mt
 */
public interface Headers {

    /**
     * Get header values.
     *
     * @param name
     *            Key of header value.
     *
     * @return header value.
     */
    List getValues(String name);

    /**
     * Get all header keys.
     *
     * @return All header keys
     */
    List getNames();

    /**
     * Put header value.
     *
     * @param name
     *            key of header value.
     * @param value
     *            header value.
     */
    void putValue(String name, String value);

    /**
     * Test header value presence.
     *
     * @param name
     *            key of header value.
     *
     * @return when header value presence, returns {@code true}
     */
    boolean contains(String name);

    /**
     * Get current header values snapshot as read-only {@link java.util.Map}.
     *
     * @return all header key and values as {@link java.util.Map}
     */
    Map> toMap();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy