ProxyControllerRegistration registerProxyController(final String elementValue, final ProxyController proxyController) { final ProxyControllerRegistration newRegistry = new ProxyControllerRegistration(elementValue, this, proxyController); final AbstractResourceRegistration appearingRegistry = childRegistriesUpdater.putIfAbsent(this, elementValue, newRegistry); if (appearingRegistry != null) { throw MESSAGES.nodeAlreadyRegistered(getLocationString(), elementValue); } //register(elementValue, newRegistry); return newRegistry; }
ManagementResourceRegistration register(final String elementValue, final ResourceDefinition provider, boolean runtimeOnly) { final AbstractResourceRegistration newRegistry = new ConcreteResourceRegistration(elementValue, this, provider, runtimeOnly); final AbstractResourceRegistration existingRegistry = childRegistriesUpdater.putIfAbsent(this, elementValue, newRegistry); if (existingRegistry != null) { throw MESSAGES.nodeAlreadyRegistered(getLocationString(), elementValue); } return newRegistry; }
public AliasResourceRegistration registerAlias(final String elementValue, AliasEntry aliasEntry, AbstractResourceRegistration target) { final AliasResourceRegistration newRegistry = new AliasResourceRegistration(elementValue, this, aliasEntry, target); final AbstractResourceRegistration existingRegistry = childRegistriesUpdater.putIfAbsent(this, elementValue, newRegistry); if (existingRegistry != null) { throw MESSAGES.nodeAlreadyRegistered(getLocationString(), elementValue); } return newRegistry; }
ProxyControllerRegistration registerProxyController(final String elementValue, final ProxyController proxyController) { final ProxyControllerRegistration newRegistry = new ProxyControllerRegistration(elementValue, this, proxyController); final AbstractResourceRegistration appearingRegistry = childRegistriesUpdater.putIfAbsent(this, elementValue, newRegistry); if (appearingRegistry != null) { throw MESSAGES.nodeAlreadyRegistered(getLocationString(), elementValue); } //register(elementValue, newRegistry); return newRegistry; }
public AliasResourceRegistration registerAlias(final String elementValue, AliasEntry aliasEntry, AbstractResourceRegistration target) { final AliasResourceRegistration newRegistry = new AliasResourceRegistration(elementValue, this, aliasEntry, target); final AbstractResourceRegistration existingRegistry = childRegistriesUpdater.putIfAbsent(this, elementValue, newRegistry); if (existingRegistry != null) { throw MESSAGES.nodeAlreadyRegistered(getLocationString(), elementValue); } return newRegistry; }
ManagementResourceRegistration register(final String elementValue, final ResourceDefinition provider, boolean runtimeOnly) { final AbstractResourceRegistration newRegistry = new ConcreteResourceRegistration(elementValue, this, provider, constraintUtilizationRegistry, runtimeOnly); final AbstractResourceRegistration existingRegistry = childRegistriesUpdater.putIfAbsent(this, elementValue, newRegistry); if (existingRegistry != null) { throw MESSAGES.nodeAlreadyRegistered(getLocationString(), elementValue); } return newRegistry; }
@Override public void registerProxyController(final PathElement address, final ProxyController controller) throws IllegalArgumentException { final AbstractResourceRegistration existing = getSubRegistration(PathAddress.pathAddress(address)); if (existing != null && existing.getValueString().equals(address.getValue())) { throw MESSAGES.nodeAlreadyRegistered(existing.getLocationString()); } getOrCreateSubregistry(address.getKey()).registerProxyController(address.getValue(), controller); }
@Override public void registerProxyController(final PathElement address, final ProxyController controller) throws IllegalArgumentException { final AbstractResourceRegistration existing = getSubRegistration(PathAddress.pathAddress(address)); if (existing != null && existing.getValueString().equals(address.getValue())) { throw MESSAGES.nodeAlreadyRegistered(existing.getLocationString()); } getOrCreateSubregistry(address.getKey()).registerProxyController(address.getValue(), controller); }
@Override public ManagementResourceRegistration registerSubModel(final ResourceDefinition resourceDefinition) { if (resourceDefinition == null) { throw MESSAGES.nullVar("resourceDefinition"); } final PathElement address = resourceDefinition.getPathElement(); if (address == null) { throw MESSAGES.cannotRegisterSubmodelWithNullPath(); } if (isRuntimeOnly()) { throw MESSAGES.cannotRegisterSubmodel(); } final AbstractResourceRegistration existing = getSubRegistration(PathAddress.pathAddress(address)); if (existing != null && existing.getValueString().equals(address.getValue())) { throw MESSAGES.nodeAlreadyRegistered(existing.getLocationString()); } final String key = address.getKey(); final NodeSubregistry child = getOrCreateSubregistry(key); final ManagementResourceRegistration resourceRegistration = child.register(address.getValue(), resourceDefinition, false); resourceDefinition.registerAttributes(resourceRegistration); resourceDefinition.registerOperations(resourceRegistration); resourceDefinition.registerChildren(resourceRegistration); return resourceRegistration; }
throw MESSAGES.nodeAlreadyRegistered(existing.getLocationString());