@Override public State register(final Object provider, final Map<Class<?>, Integer> contracts) { final State state = strategy.onChange(this); state.commonConfig.register(provider, contracts); return state; }
@Override public Object getProperty(final String name) { return commonConfig.getConfiguration().getProperty(name); }
public State loadFrom(final Configuration config) { final State state = strategy.onChange(this); state.commonConfig.loadFrom(config); return state; }
@Override public CommonConfig register(final Class<?> componentClass, final int bindingPriority) { checkComponentClassNotNull(componentClass); if (componentBag.register(componentClass, bindingPriority, getModelEnhancer(componentClass))) { processFeatureRegistration(null, componentClass); } return this; }
@Override public CommonConfig register(final Object component, final int bindingPriority) { checkProviderNotNull(component); final Class<?> componentClass = component.getClass(); if (componentBag.register(component, bindingPriority, getModelEnhancer(componentClass))) { processFeatureRegistration(component, componentClass); } return this; }
/** * Configure binders in the injection manager and enable JAX-RS features. * * @param injectionManager injection manager in which the binders and features should be configured. */ public void configureMetaProviders(InjectionManager injectionManager, ManagedObjectsFinalizer finalizer) { // First, configure existing binders Set<Binder> configuredBinders = configureBinders(injectionManager, Collections.emptySet()); // Check whether meta providers have been initialized for a config this config has been loaded from. if (!disableMetaProviderConfiguration) { // Register external meta objects configureExternalObjects(injectionManager); // Next, configure all features configureFeatures(injectionManager, new HashSet<>(), resetRegistrations(), finalizer); // At last, configure any new binders added by features configureBinders(injectionManager, configuredBinders); } }
@Override public CommonConfig register(final Class<?> componentClass, final Class<?>... contracts) { checkComponentClassNotNull(componentClass); if (contracts == null || contracts.length == 0) { LOGGER.warning(LocalizationMessages.COMPONENT_CONTRACTS_EMPTY_OR_NULL(componentClass)); return this; } if (componentBag.register(componentClass, asNewIdentitySet(contracts), getModelEnhancer(componentClass))) { processFeatureRegistration(null, componentClass); } return this; }
@Override public CommonConfig register(final Object component, final Class<?>... contracts) { checkProviderNotNull(component); final Class<?> componentClass = component.getClass(); if (contracts == null || contracts.length == 0) { LOGGER.warning(LocalizationMessages.COMPONENT_CONTRACTS_EMPTY_OR_NULL(componentClass)); return this; } if (componentBag.register(component, asNewIdentitySet(contracts), getModelEnhancer(componentClass))) { processFeatureRegistration(component, componentClass); } return this; }
/** * Configure HK2 binders in the HK2 service locator and enable JAX-RS features. * * @param locator locator in which the binders and features should be configured. */ public void configureMetaProviders(final ServiceLocator locator) { // First, configure existing binders final Set<Binder> configuredBinders = configureBinders(locator, Collections.<Binder>emptySet()); // Check whether meta providers have been initialized for a config this config has been loaded from. if (!disableMetaProviderConfiguration) { registerManagedObjectsFinalizer(locator); // Next, configure all features configureFeatures( locator, new HashSet<FeatureRegistration>(), resetRegistrations()); // At last, configure any new binders added by features configureBinders(locator, configuredBinders); } }
public void configureAutoDiscoverableProviders(InjectionManager injectionManager, List<AutoDiscoverable> autoDiscoverables) { commonConfig.configureAutoDiscoverableProviders(injectionManager, autoDiscoverables, false); }
/** * Copy the original configuration state while using the default state change * strategy. * * @param client new Jersey client parent for the state. * @param original configuration strategy to be copied. */ private State(final JerseyClient client, final State original) { this.strategy = IDENTITY; this.client = client; this.commonConfig = new CommonConfig(original.commonConfig); this.connectorProvider = original.connectorProvider; this.executorService = original.executorService; this.scheduledExecutorService = original.scheduledExecutorService; }
@Override public State property(final String name, final Object value) { final State state = strategy.onChange(this); state.commonConfig.property(name, value); return state; }
@Override public CommonConfig register(final Class<?> componentClass, final Class<?>... contracts) { checkComponentClassNotNull(componentClass); if (contracts == null || contracts.length == 0) { LOGGER.warning(LocalizationMessages.COMPONENT_CONTRACTS_EMPTY_OR_NULL(componentClass)); return this; } if (componentBag.register(componentClass, asNewIdentitySet(contracts), getModelEnhancer(componentClass))) { processFeatureRegistration(null, componentClass); } return this; }
@Override public CommonConfig register(final Object component) { checkProviderNotNull(component); final Class<?> componentClass = component.getClass(); if (componentBag.register(component, getModelEnhancer(componentClass))) { processFeatureRegistration(component, componentClass); } return this; }
@Override public CommonConfig register(final Class<?> componentClass, final int bindingPriority) { checkComponentClassNotNull(componentClass); if (componentBag.register(componentClass, bindingPriority, getModelEnhancer(componentClass))) { processFeatureRegistration(null, componentClass); } return this; }
@Override public CommonConfig register(final Object component, final Class<?>... contracts) { checkProviderNotNull(component); final Class<?> componentClass = component.getClass(); if (contracts == null || contracts.length == 0) { LOGGER.warning(LocalizationMessages.COMPONENT_CONTRACTS_EMPTY_OR_NULL(componentClass)); return this; } if (componentBag.register(component, asNewIdentitySet(contracts), getModelEnhancer(componentClass))) { processFeatureRegistration(component, componentClass); } return this; }
/** * Configure binders in the injection manager and enable JAX-RS features. * * @param injectionManager injection manager in which the binders and features should be configured. */ public void configureMetaProviders(InjectionManager injectionManager, ManagedObjectsFinalizer finalizer) { // First, configure existing binders Set<Binder> configuredBinders = configureBinders(injectionManager, Collections.emptySet()); // Check whether meta providers have been initialized for a config this config has been loaded from. if (!disableMetaProviderConfiguration) { // Register external meta objects configureExternalObjects(injectionManager); // Next, configure all features configureFeatures(injectionManager, new HashSet<>(), resetRegistrations(), finalizer); // At last, configure any new binders added by features configureBinders(injectionManager, configuredBinders); } }
/** * Configure HK2 binders in the HK2 service locator and enable JAX-RS features. * * @param locator locator in which the binders and features should be configured. */ public void configureMetaProviders(final ServiceLocator locator) { // First, configure existing binders final Set<Binder> configuredBinders = configureBinders(locator, Collections.<Binder>emptySet()); // Check whether meta providers have been initialized for a config this config has been loaded from. if (!disableMetaProviderConfiguration) { registerManagedObjectsFinalizer(locator); // Next, configure all features configureFeatures( locator, new HashSet<FeatureRegistration>(), resetRegistrations()); // At last, configure any new binders added by features configureBinders(locator, configuredBinders); } }
public void configureAutoDiscoverableProviders(InjectionManager injectionManager, List<AutoDiscoverable> autoDiscoverables) { commonConfig.configureAutoDiscoverableProviders(injectionManager, autoDiscoverables, false); }
/** * Copy the original configuration state while using the default state change * strategy. * * @param client new Jersey client parent for the state. * @param original configuration strategy to be copied. */ private State(final JerseyClient client, final State original) { this.strategy = IDENTITY; this.client = client; this.commonConfig = new CommonConfig(original.commonConfig); this.connectorProvider = original.connectorProvider; this.executorService = original.executorService; this.scheduledExecutorService = original.scheduledExecutorService; }