Package org.sonatype.nexus.component.source

Examples of org.sonatype.nexus.component.source.ComponentSource


  private final ConcurrentHashMap<String, ComponentSource> sources = new ConcurrentHashMap<>();

  public void register(ComponentSource source) {
    checkNotNull(source);

    final ComponentSource alreadyBound = sources.putIfAbsent(source.getId().getName(), source);

    checkState(alreadyBound == null, "A source is already bound to name %s", source.getId());

    log.info("Registering component source {}", source);
  }
View Full Code Here


  }

  public boolean unregister(ComponentSource source) {
    checkNotNull(source);

    final ComponentSource removed = sources.remove(source.getId());

    if (removed != null) {
      log.info("Unregistering source {}", source);
    }
View Full Code Here

    register(source);
  }

  @Override
  public ComponentSource getSource(String name) {
    final ComponentSource source = sources.get(name);
    checkArgument(source != null, "No source found with name %s", name);
    return source;
  }
View Full Code Here

  }

  @Override
  public ComponentSourceConfigId add(final ComponentSourceConfig config) throws IOException {
    final ComponentSourceConfigId id = inner.add(config);
    final ComponentSource source = create(config);
    registry.register(source);
    return id;
  }
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.component.source.ComponentSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.