Interface AutoDiscoverable

All Known Subinterfaces:
ForcedAutoDiscoverable
All Known Implementing Classes:
JacksonAutoDiscoverable, JaxbAutoDiscoverable, JsonBindingAutoDiscoverable, JsonProcessingAutoDiscoverable, KryoAutoDiscoverable, LoggingFeatureAutoDiscoverable, MonitoringAutodiscoverable, MoxyJsonAutoDiscoverable, MultiPartFeatureAutodiscoverable, RequestHeaderAutoDiscoverable, ServerFiltersAutoDiscoverable, SseAutoDiscoverable, WadlAutoDiscoverable

public interface AutoDiscoverable
A service provider contract for JAX-RS and Jersey components that need to be automatically discovered and registered in runtime configurations.

A component implementing this contract becomes auto-discoverable by adding a new entry with fully qualified name of its implementation class name to a org.glassfish.jersey.internal.spi.AutoDiscoverable file in the META-INF/services directory.

Almost all Jersey AutoDiscoverable implementations have DEFAULT_PRIORITY priority set.

Author:
Michal Gajdos
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Default common priority of Jersey build-in auto-discoverables.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    A call-back method called when an auto-discoverable component is to be configured in a given runtime configuration scope.
  • Field Details

    • DEFAULT_PRIORITY

      static final int DEFAULT_PRIORITY
      Default common priority of Jersey build-in auto-discoverables. Use lower number on your AutoDiscoverable implementation to run it before Jersey auto-discoverables and vice versa.
      See Also:
  • Method Details

    • configure

      void configure(FeatureContext context)
      A call-back method called when an auto-discoverable component is to be configured in a given runtime configuration scope.

      Note that as with JAX-RS features, before registering new JAX-RS components in a given configurable context, an auto-discoverable component should verify that newly registered components are not already registered in the configurable context.

      Parameters:
      context - configurable context in which the auto-discoverable should be configured.