Class ResourceConfig.State

    • Field Detail

      • resourceFinders

        private final java.util.Set<ResourceFinder> resourceFinders
      • resources

        private final java.util.Set<Resource> resources
      • resourcesView

        private final java.util.Set<Resource> resourcesView
      • applicationName

        private volatile java.lang.String applicationName
      • classLoader

        private volatile java.lang.ClassLoader classLoader
    • Method Detail

      • setClassLoader

        public void setClassLoader​(java.lang.ClassLoader classLoader)
      • setApplicationName

        public void setApplicationName​(java.lang.String applicationName)
      • registerResources

        public void registerResources​(java.util.Set<Resource> resources)
      • registerFinder

        public void registerFinder​(ResourceFinder resourceFinder)
      • getModelEnhancer

        protected Inflector<ContractProvider.Builder,​ContractProvider> getModelEnhancer​(java.lang.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 java.util.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 java.util.Set<ResourceFinder> getResourceFinders()
        Get the registered resource finders.
        Returns:
        registered resource finders.
      • getClassLoader

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

        private java.lang.String getApplicationName()