io.dropwizard.web.conf.HeaderFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dropwizard-web Show documentation
Show all versions of dropwizard-web Show documentation
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