Interface AutoDiscoverable
-
- All Known Subinterfaces:
ForcedAutoDiscoverable
- All Known Implementing Classes:
LoggingFeatureAutoDiscoverable
public interface AutoDiscoverableA service provider contract for JAX-RS and Jersey components that need to be automatically discovered and registered inruntime configurations. A component implementing this contract becomes auto-discoverable by adding a new entry with fully qualified name of its implementation class name to aorg.glassfish.jersey.internal.spi.AutoDiscoverablefile in theMETA-INF/servicesdirectory. Almost all JerseyAutoDiscoverableimplementations haveDEFAULT_PRIORITYpriorityset.- Author:
- Michal Gajdos
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_PRIORITYDefault common priority of Jersey build-in auto-discoverables.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidconfigure(FeatureContext context)A call-back method called when an auto-discoverable component is to be configured in a given runtime configuration scope.
-
-
-
Field Detail
-
DEFAULT_PRIORITY
static final int DEFAULT_PRIORITY
Default common priority of Jersey build-in auto-discoverables. Use lower number on yourAutoDiscoverableimplementation to run it before Jersey auto-discoverables and vice versa.- See Also:
- Constant Field Values
-
-
Method Detail
-
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.
-
-