Changeset a616a5f


Ignore:
Timestamp:
Jan 1, 2009 1:13:04 PM (12 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
44446d7
Parents:
d6148db
Message:

prep for upcoming torrent updater

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/UpdateHandler.java

    rd6148db ra616a5f  
    2828 */
    2929public class UpdateHandler {
    30     private static UpdateRunner _updateRunner;
    31     private RouterContext _context;
    32     private Log _log;
    33     private DecimalFormat _pct = new DecimalFormat("00.0%");
    34    
    35     private static final String SIGNED_UPDATE_FILE = "i2pupdate.sud";
    36     private static final String PROP_UPDATE_IN_PROGRESS = "net.i2p.router.web.UpdateHandler.updateInProgress";
     30    protected static UpdateRunner _updateRunner;
     31    protected RouterContext _context;
     32    protected Log _log;
     33    protected DecimalFormat _pct = new DecimalFormat("00.0%");
     34   
     35    protected static final String SIGNED_UPDATE_FILE = "i2pupdate.sud";
     36    protected static final String PROP_UPDATE_IN_PROGRESS = "net.i2p.router.web.UpdateHandler.updateInProgress";
    3737
    3838    public UpdateHandler() {
     
    9494   
    9595    public class UpdateRunner implements Runnable, EepGet.StatusListener {
    96         private boolean _isRunning;
    97         private String _status;
    98         private long _startedOn;
     96        protected boolean _isRunning;
     97        protected String _status;
    9998        public UpdateRunner() {
    10099            _isRunning = false;
     
    109108            _isRunning = false;
    110109        }
    111         private void update() {
    112             _startedOn = -1;
     110        protected void update() {
    113111            _status = "<b>Updating</b>";
    114112            String updateURL = selectUpdateURL();
     
    131129                    get = new EepGet(_context, 1, SIGNED_UPDATE_FILE, updateURL, false);
    132130                get.addStatusListener(UpdateRunner.this);
    133                 _startedOn = _context.clock().now();
    134131                get.fetch();
    135132            } catch (Throwable t) {
Note: See TracChangeset for help on using the changeset viewer.