Codota Logo
EncodingFilter
Code IndexAdd Codota to your IDE (free)

How to use
EncodingFilter
in
org.glassfish.jersey.server.filter

Best Java code snippets using org.glassfish.jersey.server.filter.EncodingFilter (Showing top 12 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: apache/nifi

EncodingFilter.enableFor(this, GZipEncoder.class);
origin: jersey/jersey

SortedSet<String> acceptedEncodings = new TreeSet<>(getSupportedEncodings());
origin: cubedb/cubedb

protected static void registerStuff(ResourceConfig rConfig) {
 rConfig.register(AccessOriginFilter.class);
 /*
  * rConfig.register(ErrorMapper.class);
  * rConfig.register(PreFilter.class);
  * rConfig.register(PostFilter.class);
  */
 rConfig.register(GenericExceptionMapper.class);
 rConfig.register(org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainerProvider.class);
 EncodingFilter.enableFor(rConfig, GZipEncoder.class);
 rConfig.register(JsonIteratorConverter.class);
}
origin: jersey/jersey

SortedSet<String> acceptedEncodings = new TreeSet<>(getSupportedEncodings());
origin: org.graylog2/graylog2-shared

EncodingFilter.enableFor(rc, GZipEncoder.class);
origin: org.glassfish.jersey.core/jersey-server

SortedSet<String> acceptedEncodings = new TreeSet<>(getSupportedEncodings());
origin: com.sflpro.identity/identity-api-facade

  public GenericJerseyConfig() {

    // Configurations
    register(MultiPartFeature.class);
    register(JacksonJsonProvider.class);
    register(ValidationFeature.class);

    // Exception mappers
    register(ApplicationExceptionMapper.class);
    register(DtoValidationExceptionMapper.class);
    register(JsonParseExceptionMapper.class);
    register(JsonMappingExceptionMapper.class);

    // Swagger specific settings
    register(ApiListingResource.class);
    register(SwaggerSerializers.class);
    register(CorsFilter.class);

    property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, false);
    property(CommonProperties.FEATURE_AUTO_DISCOVERY_DISABLE, true);

    EncodingFilter.enableFor(this, GZipEncoder.class);
  }
}
origin: org.glassfish.jersey.bundles/jaxrs-ri

SortedSet<String> acceptedEncodings = new TreeSet<>(getSupportedEncodings());
origin: com.moodysalem.java/jaxrs-lib

public BaseApplication() {
  // register the things that are typically used by a JAX-RS application
  // allow accepting localdate and localdatetime as query parameters, etc.
  register(JodaTimeParamConverterProvider.class);
  // allow parsing and writing localdate and localdatetime with jackson
  register(ObjectMapperContextResolver.class);
  // json parsing
  register(JacksonFeature.class);
  // template engine
  property(FreemarkerMvcFeature.CACHE_TEMPLATES, true);
  register(FreemarkerMvcFeature.class);
  // send CORS headers
  if (allowCORS()) {
    register(CORSFilter.class);
  }
  // force HTTPS behind ELB
  if (forceLoadBalancerHTTPS()) {
    register(ElasticLoadBalancerHTTPSFilter.class);
  }
  // custom exception handler
  register(RequestProcessingExceptionMapper.class);
  // map WebApplicationExceptions to the appropriate JSON structure
  register(WebApplicationExceptionMapper.class);
  EncodingFilter.enableFor(this, GZipEncoder.class);
}
origin: hstaudacher/osgi-jax-rs-connector

SortedSet<String> acceptedEncodings = Sets.newTreeSet(getSupportedEncodings());
origin: com.eclipsesource.jaxrs/jersey-all

SortedSet<String> acceptedEncodings = Sets.newTreeSet(getSupportedEncodings());
origin: hstaudacher/osgi-jax-rs-connector

SortedSet<String> acceptedEncodings = Sets.newTreeSet(getSupportedEncodings());
org.glassfish.jersey.server.filterEncodingFilter

Javadoc

Container filter that supports encoding-based content negotiation. The filter examines what content encodings are supported by the container (by looking up all the org.glassfish.jersey.spi.ContentEncoder) and decides what encoding should be chosen based on the encodings listed in the Accept-Encoding request header and their associated quality values. If none of the acceptable encodings is supported and identity encoding is explicitly forbidden by the client, the filter generates javax.ws.rs.core.Response.Status#NOT_ACCEPTABLE response.

The filter also ensures Accept-Encoding is added to the Vary header, for proper interaction with web caches.

Most used methods

  • enableFor
    Enables this filter along with the provided org.glassfish.jersey.spi.ContentEncoderfor the supplied
  • getSupportedEncodings
    Returns a (lexically) sorted set of supported encodings.

Popular in Java

  • Reading from database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • getSystemService (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • JFrame (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now