Class ImmutableCommonConfig

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

    public class ImmutableCommonConfig
    extends CommonConfig
    Immutable runtime configuration.
    • Field Detail

      • errorMessage

        private final java.lang.String errorMessage
    • Constructor Detail

      • ImmutableCommonConfig

        public ImmutableCommonConfig​(CommonConfig config,
                                     java.lang.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

      • property

        public ImmutableCommonConfig property​(java.lang.String name,
                                              java.lang.Object value)
        Specified by:
        property in interface javax.ws.rs.core.Configurable<javax.ws.rs.core.FeatureContext>
        Overrides:
        property in class CommonConfig
      • setProperties

        public ImmutableCommonConfig setProperties​(java.util.Map<java.lang.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​(java.lang.Class<?> componentClass)
        Specified by:
        register in interface javax.ws.rs.core.Configurable<javax.ws.rs.core.FeatureContext>
        Overrides:
        register in class CommonConfig
      • register

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

        public ImmutableCommonConfig register​(java.lang.Class<?> componentClass,
                                              java.lang.Class<?>... contracts)
        Specified by:
        register in interface javax.ws.rs.core.Configurable<javax.ws.rs.core.FeatureContext>
        Overrides:
        register in class CommonConfig
      • register

        public CommonConfig register​(java.lang.Class<?> componentClass,
                                     java.util.Map<java.lang.Class<?>,​java.lang.Integer> contracts)
        Specified by:
        register in interface javax.ws.rs.core.Configurable<javax.ws.rs.core.FeatureContext>
        Overrides:
        register in class CommonConfig
      • register

        public ImmutableCommonConfig register​(java.lang.Object component)
        Specified by:
        register in interface javax.ws.rs.core.Configurable<javax.ws.rs.core.FeatureContext>
        Overrides:
        register in class CommonConfig
      • register

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

        public ImmutableCommonConfig register​(java.lang.Object component,
                                              java.lang.Class<?>... contracts)
        Specified by:
        register in interface javax.ws.rs.core.Configurable<javax.ws.rs.core.FeatureContext>
        Overrides:
        register in class CommonConfig
      • register

        public CommonConfig register​(java.lang.Object component,
                                     java.util.Map<java.lang.Class<?>,​java.lang.Integer> contracts)
        Specified by:
        register in interface javax.ws.rs.core.Configurable<javax.ws.rs.core.FeatureContext>
        Overrides:
        register in class CommonConfig
      • loadFrom

        public CommonConfig 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.