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

io.dropwizard.web.conf.HeaderFactory Maven / Gradle / Ivy

Go to download

Provides support for configuring various http headers that are important for web services.

The newest version!
package io.dropwizard.web.conf;

import com.fasterxml.jackson.annotation.JsonProperty;

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

public abstract class HeaderFactory {
    @JsonProperty
    private boolean enabled = false;

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public Map build() {
        if (enabled) {
            return buildHeaders();
        } else {
            return Collections.emptyMap();
        }
    }

    protected abstract Map buildHeaders();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy