Package org.glassfish.jersey.internal
Class BootstrapBag
java.lang.Object
org.glassfish.jersey.internal.BootstrapBag
- Direct Known Subclasses:
ClientBootstrapBag,ServerBootstrapBag
A holder that is used only during Jersey bootstrap to keep the instances of the given types and then use them during the
bootstrap. This works as a replacement of an injection framework during a bootstrap and intentionally keeps all needed types in
separate fields to make strong type nature and to preserve a clear view which types are needed to inject to other services.
- Author:
- Petr Bouda
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets a list ofAutoDiscoverable.Gets an instance ofConfiguration.Gets an instance ofContextResolvers.Gets an instance ofExceptionMappers.Gets an instance ofManagedObjectsFinalizer.Gets an instance ofMessageBodyWorkers.Gets an instance ofRequestScope.protected static voidrequireNonNull(Object object, Type type) Check whether the value is notnullthat means that the properBootstrapConfiguratorhas not been configured or in a wrong order.voidsetAutoDiscoverables(List<AutoDiscoverable> autoDiscoverables) Sets a list ofAutoDiscoverable.voidsetConfiguration(Configuration configuration) Sets an instance ofConfiguration.voidsetContextResolvers(ContextResolvers contextResolvers) Sets an instance ofContextResolvers.voidsetExceptionMappers(ExceptionMappers exceptionMappers) Sets an instance ofExceptionMappers.voidsetManagedObjectsFinalizer(ManagedObjectsFinalizer managedObjectsFinalizer) Sets an instance ofManagedObjectsFinalizer.voidsetMessageBodyWorkers(MessageBodyWorkers messageBodyWorkers) Sets an instance ofMessageBodyWorkers.voidsetRequestScope(RequestScope requestScope) Sets an instance ofRequestScope.
-
Constructor Details
-
BootstrapBag
public BootstrapBag()
-
-
Method Details
-
getAutoDiscoverables
Gets a list ofAutoDiscoverable.- Returns:
- list of
AutoDiscoverable.
-
setAutoDiscoverables
Sets a list ofAutoDiscoverable.- Parameters:
autoDiscoverables- list ofAutoDiscoverable.
-
getManagedObjectsFinalizer
Gets an instance ofManagedObjectsFinalizer.- Returns:
ManagedObjectsFinalizerinstance.
-
setManagedObjectsFinalizer
Sets an instance ofManagedObjectsFinalizer.- Parameters:
managedObjectsFinalizer-ManagedObjectsFinalizerinstance.
-
getRequestScope
Gets an instance ofRequestScope.- Returns:
RequestScopeinstance.
-
setRequestScope
Sets an instance ofRequestScope.- Parameters:
requestScope-RequestScopeinstance.
-
getMessageBodyWorkers
Gets an instance ofMessageBodyWorkers.- Returns:
MessageBodyWorkersinstance.
-
setMessageBodyWorkers
Sets an instance ofMessageBodyWorkers.- Parameters:
messageBodyWorkers-MessageBodyWorkersinstance.
-
getConfiguration
Gets an instance ofConfiguration.- Returns:
Configurationinstance.
-
setConfiguration
Sets an instance ofConfiguration.- Parameters:
configuration-Configurationinstance.
-
getExceptionMappers
Gets an instance ofExceptionMappers.- Returns:
ExceptionMappersinstance.
-
setExceptionMappers
Sets an instance ofExceptionMappers.- Parameters:
exceptionMappers-ExceptionMappersinstance.
-
getContextResolvers
Gets an instance ofContextResolvers.- Returns:
ContextResolversinstance.
-
setContextResolvers
Sets an instance ofContextResolvers.- Parameters:
contextResolvers-ContextResolversinstance.
-
requireNonNull
Check whether the value is notnullthat means that the properBootstrapConfiguratorhas not been configured or in a wrong order.- Parameters:
object- tested object.type- type of the tested object.
-