public interface ComponentProvider
org.glassfish.jersey.spi.ComponentProvider
in the resource directory META-INF/services, and adding the fully
qualified service-provider-class of the implementation in the file.
Jersey will not even try to inject component provider instances with Jersey artifacts.
The SPI providers should be designed so that no dependency injection is needed at the bind time phase.Modifier and Type | Method and Description |
---|---|
default boolean |
bind(Class<?> component,
ContractProvider contractProvider)
Jersey will invoke this method before binding of each component class internally
during initialization of it's injection manager.
|
boolean |
bind(Class<?> component,
Set<Class<?>> providerContracts)
Jersey will invoke this method before binding of each component class internally
during initialization of it's injection manager.
|
void |
done()
Jersey will invoke this method after all component classes have been bound.
|
void |
initialize(org.glassfish.jersey.internal.inject.InjectionManager injectionManager)
Initializes the component provider with a reference to a injection manager
instance, which will get used in the application to manage individual components.
|
void initialize(org.glassfish.jersey.internal.inject.InjectionManager injectionManager)
injectionManager
- an injection manager.boolean bind(Class<?> component, Set<Class<?>> providerContracts)
component
- a component (resource/provider) class.providerContracts
- provider contracts implemented by given component.default boolean bind(Class<?> component, ContractProvider contractProvider)
component
- a component (resource/provider) class.contractProvider
- optional registered ContractProvider
of the component.void done()
Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.