Changeset df8bab6


Ignore:
Timestamp:
Mar 17, 2012 9:55:05 PM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
0c348ec
Parents:
f6fb4b4
Message:
  • Streaming: Scheduler cleanup
Location:
apps/streaming/java/src/net/i2p/client/streaming
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • apps/streaming/java/src/net/i2p/client/streaming/SchedulerChooser.java

    rf6fb4b4 rdf8bab6  
    1212 */
    1313class SchedulerChooser {
    14     private I2PAppContext _context;
    15     private Log _log;
    16     private TaskScheduler _nullScheduler;
     14    private final I2PAppContext _context;
     15    private final Log _log;
     16    private final TaskScheduler _nullScheduler;
    1717    /** list of TaskScheduler objects */
    18     private List _schedulers;
     18    private final List _schedulers;
    1919   
    2020    public SchedulerChooser(I2PAppContext context) {
     
    4949        return rv;
    5050    }
     51
    5152    private class NullScheduler implements TaskScheduler {
    52         private Log _log;
     53        private final Log _log;
    5354        public NullScheduler() {
    5455            _log = _context.logManager().getLog(NullScheduler.class);
  • apps/streaming/java/src/net/i2p/client/streaming/SchedulerClosed.java

    rf6fb4b4 rdf8bab6  
    22
    33import net.i2p.I2PAppContext;
    4 import net.i2p.util.Log;
    54
    65/**
     
    2625 */
    2726class SchedulerClosed extends SchedulerImpl {
    28     private Log _log;
    2927    public SchedulerClosed(I2PAppContext ctx) {
    3028        super(ctx);
    31         _log = ctx.logManager().getLog(SchedulerClosed.class);
    3229    }
    3330   
  • apps/streaming/java/src/net/i2p/client/streaming/SchedulerClosing.java

    rf6fb4b4 rdf8bab6  
    2828 */
    2929class SchedulerClosing extends SchedulerImpl {
    30     private Log _log;
     30
    3131    public SchedulerClosing(I2PAppContext ctx) {
    3232        super(ctx);
    33         _log = ctx.logManager().getLog(SchedulerClosing.class);
    3433    }
    3534   
  • apps/streaming/java/src/net/i2p/client/streaming/SchedulerConnectedBulk.java

    rf6fb4b4 rdf8bab6  
    3131 */
    3232class SchedulerConnectedBulk extends SchedulerImpl {
    33     private Log _log;
     33
    3434    public SchedulerConnectedBulk(I2PAppContext ctx) {
    3535        super(ctx);
    36         _log = ctx.logManager().getLog(SchedulerConnectedBulk.class);
    3736    }
    3837   
  • apps/streaming/java/src/net/i2p/client/streaming/SchedulerConnecting.java

    rf6fb4b4 rdf8bab6  
    2828 */
    2929class SchedulerConnecting extends SchedulerImpl {
    30     private Log _log;
    3130   
    3231    public SchedulerConnecting(I2PAppContext ctx) {
    3332        super(ctx);
    34         _log = ctx.logManager().getLog(SchedulerConnecting.class);
    3533    }
    3634   
  • apps/streaming/java/src/net/i2p/client/streaming/SchedulerDead.java

    rf6fb4b4 rdf8bab6  
    22
    33import net.i2p.I2PAppContext;
    4 import net.i2p.util.Log;
    54
    65/**
     
    2524 */
    2625class SchedulerDead extends SchedulerImpl {
    27     private Log _log;
     26
    2827    public SchedulerDead(I2PAppContext ctx) {
    2928        super(ctx);
    30         _log = ctx.logManager().getLog(SchedulerDead.class);
    3129    }
    3230   
  • apps/streaming/java/src/net/i2p/client/streaming/SchedulerHardDisconnected.java

    rf6fb4b4 rdf8bab6  
    22
    33import net.i2p.I2PAppContext;
    4 import net.i2p.util.Log;
    54
    65/**
     
    2625 */
    2726class SchedulerHardDisconnected extends SchedulerImpl {
    28     private Log _log;
     27
    2928    public SchedulerHardDisconnected(I2PAppContext ctx) {
    3029        super(ctx);
    31         _log = ctx.logManager().getLog(SchedulerHardDisconnected.class);
    3230    }
    3331   
  • apps/streaming/java/src/net/i2p/client/streaming/SchedulerImpl.java

    rf6fb4b4 rdf8bab6  
    99 */
    1010abstract class SchedulerImpl implements TaskScheduler {
    11     protected I2PAppContext _context;
    12     private Log _log;
     11    protected final I2PAppContext _context;
     12    protected final Log _log;
    1313   
    1414    public SchedulerImpl(I2PAppContext ctx) {
     
    1818   
    1919    protected void reschedule(long msToWait, Connection con) {
    20         SimpleScheduler.getInstance().addEvent(con.getConnectionEvent(), msToWait);
     20        _context.simpleScheduler().addEvent(con.getConnectionEvent(), msToWait);
    2121    }
    2222}
  • apps/streaming/java/src/net/i2p/client/streaming/SchedulerPreconnect.java

    rf6fb4b4 rdf8bab6  
    2323 */
    2424class SchedulerPreconnect extends SchedulerImpl {
    25     private Log _log;
    2625   
    2726    public SchedulerPreconnect(I2PAppContext ctx) {
    2827        super(ctx);
    29         _log = ctx.logManager().getLog(SchedulerPreconnect.class);
    3028    }
    3129   
  • apps/streaming/java/src/net/i2p/client/streaming/SchedulerReceived.java

    rf6fb4b4 rdf8bab6  
    1010 */
    1111class SchedulerReceived extends SchedulerImpl {
    12     private Log _log;
    1312   
    1413    public SchedulerReceived(I2PAppContext ctx) {
    1514        super(ctx);
    16         _log = ctx.logManager().getLog(SchedulerReceived.class);
    1715    }
    1816   
Note: See TracChangeset for help on using the changeset viewer.