torrentdownloaderloggedimpl.java

来自「这是一个基于java编写的torrent的P2P源码」· Java 代码 · 共 36 行

JAVA
36
字号
/*
 * TorrentDownloaderLoggedImpl.java
 *
 * Created on 2. November 2003, 03:26
 */

package org.gudy.azureus2.core3.torrentdownloader.impl;

/**
 *
 * @author  Tobias Minich
 */
public class TorrentDownloaderLoggedImpl extends TorrentDownloaderImpl {

    public void notifyListener() {
      super.notifyListener();
      switch(this.getDownloadState()) {
          case STATE_INIT:
            org.apache.log4j.Logger.getLogger("azureus2.torrentdownloader").info("Download of '"+this.getFile().getName()+"' queued.");
            break;
          case STATE_START:
            org.apache.log4j.Logger.getLogger("azureus2.torrentdownloader").info("Download of '"+this.getFile().getName()+"' started.");
            break;
          case STATE_FINISHED:
            org.apache.log4j.Logger.getLogger("azureus2.torrentdownloader").info("Download of '"+this.getFile().getName()+"' finished.");
            break;
          case STATE_ERROR:
            org.apache.log4j.Logger.getLogger("azureus2.torrentdownloader").error(this.getError());
            break;
          case STATE_DUPLICATE:
            org.apache.log4j.Logger.getLogger("azureus2.torrentdownloader").error("Download of '"+this.getFile().getName()+"' cancelled. File is already queued or downloading.");
      }
  }
    
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?