Class ImmutableCommonConfig
- java.lang.Object
-
- org.glassfish.jersey.model.internal.CommonConfig
-
- org.glassfish.jersey.model.internal.ImmutableCommonConfig
-
- All Implemented Interfaces:
Configurable<FeatureContext>,Configuration,FeatureContext,ExtendedConfig
public class ImmutableCommonConfig extends CommonConfig
Immutable runtime configuration.- Author:
- Marek Potociar
-
-
Constructor Summary
Constructors Constructor Description ImmutableCommonConfig(CommonConfig config)Create new immutable copy of the original runtime configuration.ImmutableCommonConfig(CommonConfig config, String modificationErrorMessage)Create new immutable copy of the original runtime configuration with a custom modification error message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommonConfigloadFrom(Configuration config)Load the internal configuration state from an externally provided configuration state.ImmutableCommonConfigproperty(String name, Object value)ImmutableCommonConfigregister(Class<?> componentClass)ImmutableCommonConfigregister(Class<?> componentClass, int bindingPriority)ImmutableCommonConfigregister(Class<?> componentClass, Class<?>... contracts)CommonConfigregister(Class<?> componentClass, Map<Class<?>,Integer> contracts)ImmutableCommonConfigregister(Object component)ImmutableCommonConfigregister(Object component, int bindingPriority)ImmutableCommonConfigregister(Object component, Class<?>... contracts)CommonConfigregister(Object component, Map<Class<?>,Integer> contracts)ImmutableCommonConfigsetProperties(Map<String,?> properties)Set the configured properties to the provided map of properties.-
Methods inherited from class org.glassfish.jersey.model.internal.CommonConfig
addProperties, configureAutoDiscoverableProviders, configureMetaProviders, equals, getClasses, getComponentBag, getConfiguration, getContracts, getInstances, getModelEnhancer, getProperties, getProperty, getPropertyNames, getRuntimeType, hashCode, isEnabled, isEnabled, isProperty, isRegistered, isRegistered
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jakarta.ws.rs.core.Configuration
hasProperty
-
-
-
-
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
-
property
public ImmutableCommonConfig property(String name, Object value)
- Specified by:
propertyin interfaceConfigurable<FeatureContext>- Overrides:
propertyin classCommonConfig
-
setProperties
public ImmutableCommonConfig setProperties(Map<String,?> properties)
Description copied from class:CommonConfigSet the configured properties to the provided map of properties.- Overrides:
setPropertiesin classCommonConfig- Parameters:
properties- new map of properties to be set.- Returns:
- updated configuration instance.
-
register
public ImmutableCommonConfig register(Class<?> componentClass)
- Specified by:
registerin interfaceConfigurable<FeatureContext>- Overrides:
registerin classCommonConfig
-
register
public ImmutableCommonConfig register(Class<?> componentClass, int bindingPriority)
- Specified by:
registerin interfaceConfigurable<FeatureContext>- Overrides:
registerin classCommonConfig
-
register
public ImmutableCommonConfig register(Class<?> componentClass, Class<?>... contracts)
- Specified by:
registerin interfaceConfigurable<FeatureContext>- Overrides:
registerin classCommonConfig
-
register
public CommonConfig register(Class<?> componentClass, Map<Class<?>,Integer> contracts)
- Specified by:
registerin interfaceConfigurable<FeatureContext>- Overrides:
registerin classCommonConfig
-
register
public ImmutableCommonConfig register(Object component)
- Specified by:
registerin interfaceConfigurable<FeatureContext>- Overrides:
registerin classCommonConfig
-
register
public ImmutableCommonConfig register(Object component, int bindingPriority)
- Specified by:
registerin interfaceConfigurable<FeatureContext>- Overrides:
registerin classCommonConfig
-
register
public ImmutableCommonConfig register(Object component, Class<?>... contracts)
- Specified by:
registerin interfaceConfigurable<FeatureContext>- Overrides:
registerin classCommonConfig
-
register
public CommonConfig register(Object component, Map<Class<?>,Integer> contracts)
- Specified by:
registerin interfaceConfigurable<FeatureContext>- Overrides:
registerin classCommonConfig
-
loadFrom
public CommonConfig loadFrom(Configuration config)
Description copied from class:CommonConfigLoad 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:
loadFromin classCommonConfig- Parameters:
config- external configuration state to replace the configuration of this configurable instance.- Returns:
- the updated common configuration instance.
-
-