Class ResourceConfig.State

java.lang.Object
org.glassfish.jersey.model.internal.CommonConfig
org.glassfish.jersey.server.ResourceConfig.State
All Implemented Interfaces:
javax.ws.rs.core.Configurable<javax.ws.rs.core.FeatureContext>, javax.ws.rs.core.Configuration, javax.ws.rs.core.FeatureContext, ExtendedConfig, ServerConfig
Direct Known Subclasses:
ResourceConfig.ImmutableState
Enclosing class:
ResourceConfig

private static class ResourceConfig.State extends CommonConfig implements ServerConfig
  • Field Details

    • resourceFinders

      private final Set<ResourceFinder> resourceFinders
    • resources

      private final Set<Resource> resources
    • resourcesView

      private final Set<Resource> resourcesView
    • applicationName

      private volatile String applicationName
    • classLoader

      private volatile ClassLoader classLoader
  • Constructor Details

  • Method Details

    • setClassLoader

      public void setClassLoader(ClassLoader classLoader)
    • setApplicationName

      public void setApplicationName(String applicationName)
    • registerResources

      public void registerResources(Set<Resource> resources)
    • registerFinder

      public void registerFinder(ResourceFinder resourceFinder)
    • getModelEnhancer

      protected Inflector<ContractProvider.Builder,ContractProvider> getModelEnhancer(Class<?> componentClass)
      Description copied from class: CommonConfig
      An extension point that provides a way how to define a custom enhancement/update operation of a contract provider model registration being produced for a given component class. Default implementation return an enhancer just builds the model.

      Derived implementations may use this method to e.g. filter out all contracts not applicable in the given configuration context or change the model scope. The returned set of filtered contracts is then used for the actual provider registration.

      Overrides:
      getModelEnhancer in class CommonConfig
      Parameters:
      componentClass - class of the component being registered.
      Returns:
      filter for the contracts that being registered for a given component class.
    • loadFrom

      public ResourceConfig.State loadFrom(javax.ws.rs.core.Configuration config)
      Description copied from class: CommonConfig
      Load the internal configuration state from an externally provided configuration state.

      Calling this method effectively replaces existing configuration state of the instance with the state represented by the externally provided configuration. If the features, auto-discoverables of given config has been already configured then this method will make sure to not configure them for the second time.

      Overrides:
      loadFrom in class CommonConfig
      Parameters:
      config - external configuration state to replace the configuration of this configurable instance.
      Returns:
      the updated common configuration instance.
    • getResources

      public final Set<Resource> getResources()
      Description copied from interface: ServerConfig
      Get programmatically modeled resources.
      Specified by:
      getResources in interface ServerConfig
      Returns:
      programmatically modeled resources.
    • getConfiguration

      public ServerConfig getConfiguration()
      Specified by:
      getConfiguration in interface javax.ws.rs.core.Configurable<javax.ws.rs.core.FeatureContext>
      Overrides:
      getConfiguration in class CommonConfig
    • getResourceFinders

      public Set<ResourceFinder> getResourceFinders()
      Get the registered resource finders.
      Returns:
      registered resource finders.
    • getClassLoader

      public ClassLoader getClassLoader()
      Get resource and provider class loader.
      Returns:
      class loader to be used when looking up the resource classes and providers.
    • getApplicationName

      private String getApplicationName()