Package org.glassfish.jersey.internal
Class BootstrapBag
- java.lang.Object
-
- org.glassfish.jersey.internal.BootstrapBag
-
public class BootstrapBag extends Object
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 Constructor Description BootstrapBag()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.glassfish.jersey.internal.spi.AutoDiscoverable>getAutoDiscoverables()Gets a list ofAutoDiscoverable.ConfigurationgetConfiguration()Gets an instance ofConfiguration.ContextResolversgetContextResolvers()Gets an instance ofContextResolvers.ExceptionMappersgetExceptionMappers()Gets an instance ofExceptionMappers.ManagedObjectsFinalizergetManagedObjectsFinalizer()Gets an instance ofManagedObjectsFinalizer.MessageBodyWorkersgetMessageBodyWorkers()Gets an instance ofMessageBodyWorkers.RequestScopegetRequestScope()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<org.glassfish.jersey.internal.spi.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.
-
-
-
Method Detail
-
getAutoDiscoverables
public List<org.glassfish.jersey.internal.spi.AutoDiscoverable> getAutoDiscoverables()
Gets a list ofAutoDiscoverable.- Returns:
- list of
AutoDiscoverable.
-
setAutoDiscoverables
public void setAutoDiscoverables(List<org.glassfish.jersey.internal.spi.AutoDiscoverable> autoDiscoverables)
Sets a list ofAutoDiscoverable.- Parameters:
autoDiscoverables- list ofAutoDiscoverable.
-
getManagedObjectsFinalizer
public ManagedObjectsFinalizer getManagedObjectsFinalizer()
Gets an instance ofManagedObjectsFinalizer.- Returns:
ManagedObjectsFinalizerinstance.
-
setManagedObjectsFinalizer
public void setManagedObjectsFinalizer(ManagedObjectsFinalizer managedObjectsFinalizer)
Sets an instance ofManagedObjectsFinalizer.- Parameters:
managedObjectsFinalizer-ManagedObjectsFinalizerinstance.
-
getRequestScope
public RequestScope getRequestScope()
Gets an instance ofRequestScope.- Returns:
RequestScopeinstance.
-
setRequestScope
public void setRequestScope(RequestScope requestScope)
Sets an instance ofRequestScope.- Parameters:
requestScope-RequestScopeinstance.
-
getMessageBodyWorkers
public MessageBodyWorkers getMessageBodyWorkers()
Gets an instance ofMessageBodyWorkers.- Returns:
MessageBodyWorkersinstance.
-
setMessageBodyWorkers
public void setMessageBodyWorkers(MessageBodyWorkers messageBodyWorkers)
Sets an instance ofMessageBodyWorkers.- Parameters:
messageBodyWorkers-MessageBodyWorkersinstance.
-
getConfiguration
public Configuration getConfiguration()
Gets an instance ofConfiguration.- Returns:
Configurationinstance.
-
setConfiguration
public void setConfiguration(Configuration configuration)
Sets an instance ofConfiguration.- Parameters:
configuration-Configurationinstance.
-
getExceptionMappers
public ExceptionMappers getExceptionMappers()
Gets an instance ofExceptionMappers.- Returns:
ExceptionMappersinstance.
-
setExceptionMappers
public void setExceptionMappers(ExceptionMappers exceptionMappers)
Sets an instance ofExceptionMappers.- Parameters:
exceptionMappers-ExceptionMappersinstance.
-
getContextResolvers
public ContextResolvers getContextResolvers()
Gets an instance ofContextResolvers.- Returns:
ContextResolversinstance.
-
setContextResolvers
public void setContextResolvers(ContextResolvers contextResolvers)
Sets an instance ofContextResolvers.- Parameters:
contextResolvers-ContextResolversinstance.
-
requireNonNull
protected static void requireNonNull(Object object, Type type)
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.
-
-