Examples of DownloadListener


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

Examples of aQute.bnd.service.RepositoryPlugin.DownloadListener

    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

Examples of aQute.bnd.service.RepositoryPlugin.DownloadListener

      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

Examples of com.groovesquid.service.DownloadListener

       
        searchTable.getSelectionModel().clearSelection();
    }
   
    public DownloadListener getDownloadListener(final DownloadTableModel downloadTableModel) {
        final DownloadListener downloadListener = new DownloadListener() {
            public void downloadedBytesChanged(Track track) {
                int row = downloadTableModel.getSongDownloads().indexOf(track);
                if(row >= 0) {
                    downloadTableModel.fireTableCellUpdated(row, 5);
                }
View Full Code Here

Examples of org.apache.ivy.core.cache.DownloadListener

            throws IOException {
        /* Default implementation is a no-op */
    }

    private DownloadListener getDownloadListener(final DownloadOptions options) {
        return new DownloadListener() {
            public void needArtifact(RepositoryCacheManager cache, Artifact artifact) {
                if (eventManager != null) {
                    eventManager
                            .fireIvyEvent(new NeedArtifactEvent(AbstractResolver.this, artifact));
                }
View Full Code Here

Examples of org.apache.ivy.core.cache.DownloadListener

                throw new RuntimeException("Unknown log level: " + logLevel);
            }
        } else {
            log = Message.MSG_INFO;
        }
        options.setListener(new DownloadListener() {
            public void startArtifactDownload(RepositoryCacheManager cache, ResolvedResource rres,
                    Artifact artifact, ArtifactOrigin origin) {
                if (log <= Message.MSG_INFO) {
                    Message.info("\tdownloading " + rres.getResource().getName());
                }
View Full Code Here

Examples of org.apache.ivy.core.cache.DownloadListener

            ModuleRevisionId module, boolean overwrite) throws IOException {
        /* Default implementation is a no-op */
    }

    private DownloadListener getDownloadListener(final DownloadOptions options) {
        return new DownloadListener() {
            public void needArtifact(RepositoryCacheManager cache, Artifact artifact) {
                if (eventManager != null) {
                    eventManager.fireIvyEvent(
                        new NeedArtifactEvent(AbstractResolver.this, artifact));
                }
View Full Code Here

Examples of org.apache.ivy.core.cache.DownloadListener

            ModuleRevisionId module, boolean overwrite) throws IOException {
        /* Default implementation is a no-op */
    }

    private DownloadListener getDownloadListener(final DownloadOptions options) {
        return new DownloadListener() {
            public void needArtifact(RepositoryCacheManager cache, Artifact artifact) {
                if (eventManager != null) {
                    eventManager.fireIvyEvent(
                        new NeedArtifactEvent(AbstractResolver.this, artifact));
                }
View Full Code Here

Examples of org.apache.ivy.core.cache.DownloadListener

            ModuleRevisionId module, boolean overwrite) throws IOException {
        /* Default implementation is a no-op */
    }

    private DownloadListener getDownloadListener(final DownloadOptions options) {
        return new DownloadListener() {
            public void needArtifact(RepositoryCacheManager cache, Artifact artifact) {
                if (eventManager != null) {
                    eventManager.fireIvyEvent(
                        new NeedArtifactEvent(AbstractResolver.this, artifact));
                }
View Full Code Here

Examples of org.apache.ivy.core.cache.DownloadListener

            ModuleRevisionId module, boolean overwrite) throws IOException {
        /* Default implementation is a no-op */
    }

    private DownloadListener getDownloadListener(final DownloadOptions options) {
        return new DownloadListener() {
            public void needArtifact(RepositoryCacheManager cache, Artifact artifact) {
                if (eventManager != null) {
                    eventManager.fireIvyEvent(
                        new NeedArtifactEvent(AbstractResolver.this, artifact));
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.