Class BootstrapBag

java.lang.Object
org.glassfish.jersey.internal.BootstrapBag
Direct Known Subclasses:
ClientBootstrapBag, ServerBootstrapBag

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 Details

    • BootstrapBag

      public BootstrapBag()
  • Method Details

    • getAutoDiscoverables

      public List<AutoDiscoverable> getAutoDiscoverables()
      Gets a list of AutoDiscoverable.
      Returns:
      list of AutoDiscoverable.
    • setAutoDiscoverables

      public void setAutoDiscoverables(List<AutoDiscoverable> autoDiscoverables)
      Sets a list of AutoDiscoverable.
      Parameters:
      autoDiscoverables - list of AutoDiscoverable.
    • getManagedObjectsFinalizer

      public ManagedObjectsFinalizer getManagedObjectsFinalizer()
      Gets an instance of ManagedObjectsFinalizer.
      Returns:
      ManagedObjectsFinalizer instance.
    • setManagedObjectsFinalizer

      public void setManagedObjectsFinalizer(ManagedObjectsFinalizer managedObjectsFinalizer)
      Sets an instance of ManagedObjectsFinalizer.
      Parameters:
      managedObjectsFinalizer - ManagedObjectsFinalizer instance.
    • getRequestScope

      public RequestScope getRequestScope()
      Gets an instance of RequestScope.
      Returns:
      RequestScope instance.
    • setRequestScope

      public void setRequestScope(RequestScope requestScope)
      Sets an instance of RequestScope.
      Parameters:
      requestScope - RequestScope instance.
    • getMessageBodyWorkers

      public MessageBodyWorkers getMessageBodyWorkers()
      Gets an instance of MessageBodyWorkers.
      Returns:
      MessageBodyWorkers instance.
    • setMessageBodyWorkers

      public void setMessageBodyWorkers(MessageBodyWorkers messageBodyWorkers)
      Sets an instance of MessageBodyWorkers.
      Parameters:
      messageBodyWorkers - MessageBodyWorkers instance.
    • getConfiguration

      public Configuration getConfiguration()
      Gets an instance of Configuration.
      Returns:
      Configuration instance.
    • setConfiguration

      public void setConfiguration(Configuration configuration)
      Sets an instance of Configuration.
      Parameters:
      configuration - Configuration instance.
    • getExceptionMappers

      public ExceptionMappers getExceptionMappers()
      Gets an instance of ExceptionMappers.
      Returns:
      ExceptionMappers instance.
    • setExceptionMappers

      public void setExceptionMappers(ExceptionMappers exceptionMappers)
      Sets an instance of ExceptionMappers.
      Parameters:
      exceptionMappers - ExceptionMappers instance.
    • getContextResolvers

      public ContextResolvers getContextResolvers()
      Gets an instance of ContextResolvers.
      Returns:
      ContextResolvers instance.
    • setContextResolvers

      public void setContextResolvers(ContextResolvers contextResolvers)
      Sets an instance of ContextResolvers.
      Parameters:
      contextResolvers - ContextResolvers instance.
    • requireNonNull

      protected static void requireNonNull(Object object, Type type)
      Check whether the value is not null that means that the proper BootstrapConfigurator has not been configured or in a wrong order.
      Parameters:
      object - tested object.
      type - type of the tested object.