Class ImmutableCommonConfig

  • All Implemented Interfaces:
    jakarta.ws.rs.core.Configurable<jakarta.ws.rs.core.FeatureContext>, jakarta.ws.rs.core.Configuration, jakarta.ws.rs.core.FeatureContext, ExtendedConfig

    public class ImmutableCommonConfig
    extends CommonConfig
    Immutable runtime configuration.
    Author:
    Marek Potociar
    • Constructor Detail

      • ImmutableCommonConfig

        public ImmutableCommonConfig​(CommonConfig config,
                                     String modificationErrorMessage)
        Create new immutable copy of the original runtime configuration with a custom modification error message.
        Parameters:
        config - original runtime configuration.
        modificationErrorMessage - custom modification error message.
      • ImmutableCommonConfig

        public ImmutableCommonConfig​(CommonConfig config)
        Create new immutable copy of the original runtime configuration.
        Parameters:
        config - original runtime configuration.
    • Method Detail

      • setProperties

        public ImmutableCommonConfig setProperties​(Map<String,​?> properties)
        Description copied from class: CommonConfig
        Set the configured properties to the provided map of properties.
        Overrides:
        setProperties in class CommonConfig
        Parameters:
        properties - new map of properties to be set.
        Returns:
        updated configuration instance.
      • register

        public ImmutableCommonConfig register​(Class<?> componentClass,
                                              int bindingPriority)
        Specified by:
        register in interface jakarta.ws.rs.core.Configurable<jakarta.ws.rs.core.FeatureContext>
        Overrides:
        register in class CommonConfig
      • register

        public ImmutableCommonConfig register​(Object component,
                                              int bindingPriority)
        Specified by:
        register in interface jakarta.ws.rs.core.Configurable<jakarta.ws.rs.core.FeatureContext>
        Overrides:
        register in class CommonConfig
      • loadFrom

        public CommonConfig loadFrom​(jakarta.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.