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
-
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 void
requireNonNull
(Object object, Type type) Check whether the value is notnull
that means that the properBootstrapConfigurator
has not been configured or in a wrong order.void
setAutoDiscoverables
(List<AutoDiscoverable> autoDiscoverables) Sets a list ofAutoDiscoverable
.void
setConfiguration
(Configuration configuration) Sets an instance ofConfiguration
.void
setContextResolvers
(ContextResolvers contextResolvers) Sets an instance ofContextResolvers
.void
setExceptionMappers
(ExceptionMappers exceptionMappers) Sets an instance ofExceptionMappers
.void
setManagedObjectsFinalizer
(ManagedObjectsFinalizer managedObjectsFinalizer) Sets an instance ofManagedObjectsFinalizer
.void
setMessageBodyWorkers
(MessageBodyWorkers messageBodyWorkers) Sets an instance ofMessageBodyWorkers
.void
setRequestScope
(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:
ManagedObjectsFinalizer
instance.
-
setManagedObjectsFinalizer
Sets an instance ofManagedObjectsFinalizer
.- Parameters:
managedObjectsFinalizer
-ManagedObjectsFinalizer
instance.
-
getRequestScope
Gets an instance ofRequestScope
.- Returns:
RequestScope
instance.
-
setRequestScope
Sets an instance ofRequestScope
.- Parameters:
requestScope
-RequestScope
instance.
-
getMessageBodyWorkers
Gets an instance ofMessageBodyWorkers
.- Returns:
MessageBodyWorkers
instance.
-
setMessageBodyWorkers
Sets an instance ofMessageBodyWorkers
.- Parameters:
messageBodyWorkers
-MessageBodyWorkers
instance.
-
getConfiguration
Gets an instance ofConfiguration
.- Returns:
Configuration
instance.
-
setConfiguration
Sets an instance ofConfiguration
.- Parameters:
configuration
-Configuration
instance.
-
getExceptionMappers
Gets an instance ofExceptionMappers
.- Returns:
ExceptionMappers
instance.
-
setExceptionMappers
Sets an instance ofExceptionMappers
.- Parameters:
exceptionMappers
-ExceptionMappers
instance.
-
getContextResolvers
Gets an instance ofContextResolvers
.- Returns:
ContextResolvers
instance.
-
setContextResolvers
Sets an instance ofContextResolvers
.- Parameters:
contextResolvers
-ContextResolvers
instance.
-
requireNonNull
Check whether the value is notnull
that means that the properBootstrapConfigurator
has not been configured or in a wrong order.- Parameters:
object
- tested object.type
- type of the tested object.
-