Examples of DownloadListener


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.gudy.azureus2.plugins.download.DownloadListener

     
      trackDownload( download );
    }
   
    download.addListener(
      new DownloadListener()
      {
        public void
        stateChanged(
          Download    download,
          int        old_state,
View Full Code Here

Examples of org.gudy.azureus2.plugins.download.DownloadListener

    }else{
           
      if ( torrent != null && torrent.isDecentralised()){
       
        download.addListener(
          new DownloadListener()
          {
            public void
            stateChanged(
              final Download    download,
              int          old_state,
View Full Code Here

Examples of org.gudy.azureus2.plugins.download.DownloadListener

                    public void
                    downloadAdded(
                    final Download  download )
                    {
                        //DownloadManagerUtils.cleanAll();
                        download.addListener(new DownloadListener() {

                            public void stateChanged(Download download, int old_state, int new_state) {
                                //System.out.println(download.getName() + " : From: " + old_state + " : To: " + new_state);
                                if(old_state == Download.ST_DOWNLOADING
                                        && new_state == Download.ST_SEEDING
View Full Code Here

Examples of org.gudy.azureus2.plugins.download.DownloadListener

                       
                        //we now have the 'download' and need to add the specific listener
                        //for change state.. a downloadListener comes with two methods that need
                        //to be addressed: stateChanged which is what we want and positionChanged
                        //which we just don't use
                        download.addListener(new DownloadListener()
                                {

                                    public void stateChanged(Download download, int old_state, int new_state) {
                                        //Statechange to look for.. we are only interested in a torrent going from
                                        //downloading (state 4) to some other state
View Full Code Here

Examples of org.spoutcraft.launcher.util.DownloadListener

  public void setWaiting(boolean waiting) {
    updateThread.setWaiting(waiting);
  }

  public void onSpoutcraftBuildChange() {
    DownloadListener old = updateThread.getDownloadListener();
    updateThread.setDownloadListener(null);
    updateThread.interrupt();
    MinecraftLauncher.resetClassLoader();
    updateThread = new UpdateThread(updateThread);
    updateThread.setDownloadListener(old);
View Full Code Here

Examples of org.spoutcraft.launcher.util.DownloadListener

  private class DownloadListenerWrapper implements DownloadListener {
    private final AtomicReference<DownloadListener> wrapped = new AtomicReference<DownloadListener>(null);
    public void stateChanged(String fileName, float progress) {
      fileName = (new File(fileName)).getName();
      DownloadListener listener = wrapped.get();
      if (listener != null) {
        listener.stateChanged(fileName, progress);
      }
    }
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.