Class CdiServerComponentProvider
java.lang.Object
org.glassfish.jersey.ext.cdi1x.internal.CdiServerComponentProvider
- All Implemented Interfaces:
ComponentProvider
,ComponentProvider
Implementation of ComponentProvider for Jersey Server
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Jersey will invoke this method before binding of each component class internally during initialization of it's injection manager.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.void
done()
Jersey will invoke this method after all component classes have been bound.void
initialize
(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.
-
Constructor Details
-
CdiServerComponentProvider
public CdiServerComponentProvider()
-
-
Method Details
-
initialize
Description copied from interface:ComponentProvider
Initializes the component provider with a reference to a injection manager instance, which will get used in the application to manage individual components. Providers should keep a reference to the injection manager for later use. This method will be invoked prior to any bind method calls. The injection manager parameter will not be fully initialized at the time of invocation and should be used as a reference only.- Specified by:
initialize
in interfaceComponentProvider
- Parameters:
injectionManager
- an injection manager.
-
bind
Description copied from interface:ComponentProvider
Jersey will invoke this method before binding of each component class internally during initialization of it's injection manager. If the component provider wants to bind the component class itself, it must do so and return true. In that case, Jersey will not bind the component and rely on the component provider in this regard.- Specified by:
bind
in interfaceComponentProvider
- Parameters:
component
- a component (resource/provider) class.providerContracts
- provider contracts implemented by given component.- Returns:
- true if the component class has been bound by the provider, false otherwise
-
bind
Description copied from interface:ComponentProvider
Jersey will invoke this method before binding of each component class internally during initialization of it's injection manager. If the component provider wants to bind the component class itself, it must do so and return true. In that case, Jersey will not bind the component and rely on the component provider in this regard.- Specified by:
bind
in interfaceComponentProvider
- Parameters:
component
- a component (resource/provider) class.contractProvider
- optional registeredContractProvider
of the component.- Returns:
- true if the component class has been bound by the provider, false otherwise
-
done
public void done()Description copied from interface:ComponentProvider
Jersey will invoke this method after all component classes have been bound. If the component provider wants to do some actions after it has seen all component classes registered with the application, this is the right place for the corresponding code.- Specified by:
done
in interfaceComponentProvider
-