Package org.glassfish.jersey.internal
Interface BootstrapConfigurator
- All Known Implementing Classes:
AbstractExecutorProvidersConfigurator
,AbstractFeatureConfigurator
,AbstractServiceFinderConfigurator
,AutoDiscoverableConfigurator
,ContextResolverFactory.ContextResolversConfigurator
,DynamicFeatureConfigurator
,ExceptionMapperFactory.ExceptionMappersConfigurator
,FeatureConfigurator
,JaxrsProviders.ProvidersConfigurator
,MessageBodyFactory.MessageBodyWorkersConfigurator
,RequestScope.RequestScopeConfigurator
,ResourceMethodInvokerConfigurator
,ResourceModelConfigurator
public interface BootstrapConfigurator
Configurator which contains two methods,
init(InjectionManager, BootstrapBag)
contains InjectionManager
into which only registering services make sense because injection manager has not been completed yet and
postInit(InjectionManager, BootstrapBag)
in which InjectionManager
has been already completed and is able to
create and provide services.
The configurators should register instances into InjectionManager
only if the instance must be really injectable if
the instance can be used internally without the injection, then extend BootstrapBag
and propagate the instance to
correct services using constructors or methods in a phase of Jersey initialization.
- Author:
- Petr Bouda
-
Method Summary
Modifier and TypeMethodDescriptionvoid
init
(org.glassfish.jersey.internal.inject.InjectionManager injectionManager, BootstrapBag bootstrapBag) Pre-initialization method should only register services intoInjectionManager
and populateBootstrapBag
.default void
postInit
(org.glassfish.jersey.internal.inject.InjectionManager injectionManager, BootstrapBag bootstrapBag) Post-initialization method can get services fromInjectionManager
and is not able to register the new one because injection manager is already completed.
-
Method Details
-
init
void init(org.glassfish.jersey.internal.inject.InjectionManager injectionManager, BootstrapBag bootstrapBag) Pre-initialization method should only register services intoInjectionManager
and populateBootstrapBag
.- Parameters:
injectionManager
- not completed injection manager.bootstrapBag
- bootstrap bag with services used in following processing.
-
postInit
default void postInit(org.glassfish.jersey.internal.inject.InjectionManager injectionManager, BootstrapBag bootstrapBag) Post-initialization method can get services fromInjectionManager
and is not able to register the new one because injection manager is already completed.- Parameters:
injectionManager
- already completed injection manager.bootstrapBag
- bootstrap bag with services used in following processing.
-