|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ComponentProvider
Component provider interface to allow custom management of 3rd party components life-cycle and dependency injection.
An implementation (a component-provider) identifies itself by placing a provider-configuration file (if not already present),org.glassfish.jersey.server.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.
| Method Summary | |
|---|---|
boolean |
bind(Class<?> component,
Set<Class<?>> providerContracts)
Jersey will invoke this method before binding of each component class internally during initialization of it's HK2 service locator. |
void |
done()
Jersey will invoke this method after all component classes have been bound. |
void |
initialize(ServiceLocator locator)
Initializes the component provider with a reference to a HK2 service locator instance, which will get used in the application to manage individual components. |
| Method Detail |
|---|
void initialize(ServiceLocator locator)
locator - an HK2 service locator.
boolean bind(Class<?> component,
Set<Class<?>> providerContracts)
component - a component (resource/provider) class.providerContracts - provider contracts implemented by given component.
void done()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||