Package org.sonatype.nexus.proxy.events

Examples of org.sonatype.nexus.proxy.events.RepositoryRegistryEventAdd


    synchronized (this) {
      repositoriesMapPut(repository);
      rtd.instanceRegistered(this);
    }

    eventBus.post(new RepositoryRegistryEventAdd(this, repository));
  }
View Full Code Here


    verify(eventBus).register(underTest);

    assertThat(underTest.isSatisfied(), is(false));

    underTest.handle(new RepositoryRegistryEventAdd(repositoryRegistry, repository));
  }
View Full Code Here

  @Test
  public void satisfiedWhenRepositoryAdded() {
    assertThat(underTest.isSatisfied(), is(true));

    underTest.handle(new RepositoryRegistryEventRemove(repositoryRegistry, repository));
    underTest.handle(new RepositoryRegistryEventAdd(repositoryRegistry, repository));
    assertThat(underTest.isSatisfied(), is(true));

    verifyEventBusEvents(satisfied(underTest), unsatisfied(underTest), satisfied(underTest));
  }
View Full Code Here

  @Override
  protected void doBind() {
    try {
      bindLock.writeLock().lock();
      for (final Repository repository : repositoryRegistry.getRepositories()) {
        handle(new RepositoryRegistryEventAdd(repositoryRegistry, repository));
      }
    }
    finally {
      bindLock.writeLock().unlock();
    }
View Full Code Here

    if (event.getReference().context().id().equals(capabilityIdentity)) {
      if (!sameRepositoryAs(repositoryBeforeLastUpdate)) {
        try {
          bindLock.writeLock().lock();
          for (final Repository repository : repositoryRegistry.getRepositories()) {
            handle(new RepositoryRegistryEventAdd(repositoryRegistry, repository));
          }
        }
        finally {
          bindLock.writeLock().unlock();
        }
View Full Code Here

    verify(eventBus).register(underTest);

    assertThat(underTest.isSatisfied(), is(false));

    underTest.handle(new RepositoryRegistryEventAdd(repositoryRegistry, repository));
  }
View Full Code Here

    verify(eventBus).register(underTest);

    assertThat(underTest.isSatisfied(), is(false));

    underTest.handle(new RepositoryRegistryEventAdd(repositoryRegistry, repository));
  }
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.proxy.events.RepositoryRegistryEventAdd

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.