Package aQute.bnd.service.RepositoryPlugin

Examples of aQute.bnd.service.RepositoryPlugin.DownloadListener


    // Check download listeners
    //
    final Semaphore s = new Semaphore(0);
    final AtomicBoolean success = new AtomicBoolean(false);

    repoImpl.getResource(t.id, new DownloadListener() {

      @Override
      public void success(File file) throws Exception {
        System.out.println("Success");
        success.set(true);
View Full Code Here


    ResourceDescriptor rd = create("jar/osgi.jar");
    repoImpl.add("x", rd);

    final Semaphore done = new Semaphore(0);

    DownloadListener l = new DownloadListener() {

      @Override
      public void success(File file) throws Exception {
        done.release();
      }
View Full Code Here

      assertNotNull(r.artifact);
      File f = new File(r.artifact); // file repo, so should match
      SHA1 sha1 = SHA1.digest(srcBundle);
      sha1.equals(SHA1.digest(f));

      DownloadListener mock = Mockito.mock(DownloadListener.class);

      f = repo.get("test", new Version("0"), null, mock);
      Mockito.verify(mock).success(f);
      Mockito.verifyNoMoreInteractions(mock);
      Mockito.reset(mock);
View Full Code Here

TOP

Related Classes of aQute.bnd.service.RepositoryPlugin.DownloadListener

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.