com.yammer.dropwizard.config.GzipConfiguration Maven / Gradle / Ivy
package com.yammer.dropwizard.config;
import com.google.common.base.Optional;
import com.google.common.collect.ImmutableSet;
import com.yammer.dropwizard.util.Size;
import org.codehaus.jackson.annotate.JsonProperty;
@SuppressWarnings({ "FieldMayBeFinal", "FieldCanBeLocal" })
public class GzipConfiguration {
@JsonProperty
protected boolean enabled = true;
@JsonProperty
protected Size minimumEntitySize = null;
@JsonProperty
protected Size bufferSize = null;
@JsonProperty
protected ImmutableSet excludedUserAgents = null;
@JsonProperty
protected ImmutableSet compressedMimeTypes = null;
public boolean isEnabled() {
return enabled;
}
public Optional getMinimumEntitySize() {
return Optional.fromNullable(minimumEntitySize);
}
public Optional getBufferSize() {
return Optional.fromNullable(bufferSize);
}
public Optional> getExcludedUserAgents() {
return Optional.fromNullable(excludedUserAgents);
}
public Optional> getCompressedMimeTypes() {
return Optional.fromNullable(compressedMimeTypes);
}
}