org.glassfish.jersey.model.internal
Class ImmutableCommonConfig

java.lang.Object
  extended by org.glassfish.jersey.model.internal.CommonConfig
      extended by 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 (marek.potociar at oracle.com)

Constructor Summary
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
 ImmutableCommonConfig register(Class<?> componentClass)
           
 ImmutableCommonConfig register(Class<?> componentClass, Class<?>... contracts)
           
 ImmutableCommonConfig register(Class<?> componentClass, int bindingPriority)
           
 CommonConfig register(Class<?> componentClass, Map<Class<?>,Integer> contracts)
           
 ImmutableCommonConfig register(Object component)
           
 ImmutableCommonConfig register(Object component, Class<?>... contracts)
           
 ImmutableCommonConfig register(Object component, int bindingPriority)
           
 CommonConfig register(Object component, Map<Class<?>,Integer> contracts)
           
 CommonConfig replaceWith(Configuration config)
           
 ImmutableCommonConfig setProperties(Map<String,?> properties)
          Set the configured properties to the provided map of properties.
 ImmutableCommonConfig setProperty(String name, Object value)
           
 
Methods inherited from class org.glassfish.jersey.model.internal.CommonConfig
addProperties, 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
 

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

setProperty

public ImmutableCommonConfig setProperty(String name,
                                         Object value)
Specified by:
setProperty in interface Configurable<FeatureContext>
Overrides:
setProperty in class CommonConfig

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)
Specified by:
register in interface Configurable<FeatureContext>
Overrides:
register in class CommonConfig

register

public ImmutableCommonConfig register(Class<?> componentClass,
                                      int bindingPriority)
Specified by:
register in interface Configurable<FeatureContext>
Overrides:
register in class CommonConfig

register

public ImmutableCommonConfig register(Class<?> componentClass,
                                      Class<?>... contracts)
Specified by:
register in interface Configurable<FeatureContext>
Overrides:
register in class CommonConfig

register

public CommonConfig register(Class<?> componentClass,
                             Map<Class<?>,Integer> contracts)
Specified by:
register in interface Configurable<FeatureContext>
Overrides:
register in class CommonConfig

register

public ImmutableCommonConfig register(Object component)
Specified by:
register in interface Configurable<FeatureContext>
Overrides:
register in class CommonConfig

register

public ImmutableCommonConfig register(Object component,
                                      int bindingPriority)
Specified by:
register in interface Configurable<FeatureContext>
Overrides:
register in class CommonConfig

register

public ImmutableCommonConfig register(Object component,
                                      Class<?>... contracts)
Specified by:
register in interface Configurable<FeatureContext>
Overrides:
register in class CommonConfig

register

public CommonConfig register(Object component,
                             Map<Class<?>,Integer> contracts)
Specified by:
register in interface Configurable<FeatureContext>
Overrides:
register in class CommonConfig

replaceWith

public CommonConfig replaceWith(Configuration config)
Specified by:
replaceWith in interface Configurable<FeatureContext>
Overrides:
replaceWith in class CommonConfig


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.