Changeset 04485375


Ignore:
Timestamp:
Oct 5, 2012 1:38:27 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
ddc7504
Parents:
583463a
Message:

make inbound and exploratory settings final

Location:
router/java/src/net/i2p/router
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/ClientTunnelSettings.java

    r583463a r04485375  
    2121   
    2222    public ClientTunnelSettings() {
    23         _inboundSettings = new TunnelPoolSettings();
    24         _inboundSettings.setIsInbound(true);
    25         _inboundSettings.setIsExploratory(false);
    26         _outboundSettings = new TunnelPoolSettings();
    27         _outboundSettings.setIsInbound(false);
    28         _outboundSettings.setIsExploratory(false);
     23        _inboundSettings = new TunnelPoolSettings(false, true);
     24        _outboundSettings = new TunnelPoolSettings(false, false);
    2925    }
    3026   
  • router/java/src/net/i2p/router/TunnelPoolSettings.java

    r583463a r04485375  
    2222    private int _lengthVariance;
    2323    private int _lengthOverride;
    24     private boolean _isInbound;
    25     private boolean _isExploratory;
     24    private final boolean _isInbound;
     25    private final boolean _isExploratory;
    2626    private boolean _allowZeroHop;
    2727    private int _IPRestriction;
     
    5555    public static final int     DEFAULT_IP_RESTRICTION = 2;    // class B (/16)
    5656   
    57     public TunnelPoolSettings() {
     57    public TunnelPoolSettings(boolean isExploratory, boolean isInbound) {
     58        _isExploratory = isExploratory;
     59        _isInbound = isInbound;
    5860        _quantity = DEFAULT_QUANTITY;
    5961        _backupQuantity = DEFAULT_BACKUP_QUANTITY;
     
    131133    /** is this an inbound tunnel? */
    132134    public boolean isInbound() { return _isInbound; }
    133     public void setIsInbound(boolean isInbound) { _isInbound = isInbound; }
    134135   
    135136    /** is this an exploratory tunnel (or a client tunnel) */
    136137    public boolean isExploratory() { return _isExploratory; }
    137     public void setIsExploratory(boolean isExploratory) { _isExploratory = isExploratory; }
    138138   
    139139    // Duration is hardcoded
  • router/java/src/net/i2p/router/tunnel/pool/TunnelPoolManager.java

    r583463a r04485375  
    6565
    6666        ExploratoryPeerSelector selector = new ExploratoryPeerSelector(_context);
    67         TunnelPoolSettings inboundSettings = new TunnelPoolSettings();
    68         inboundSettings.setIsExploratory(true);
    69         inboundSettings.setIsInbound(true);
     67        TunnelPoolSettings inboundSettings = new TunnelPoolSettings(true, true);
    7068        _inboundExploratory = new TunnelPool(_context, this, inboundSettings, selector);
    71         TunnelPoolSettings outboundSettings = new TunnelPoolSettings();
    72         outboundSettings.setIsExploratory(true);
    73         outboundSettings.setIsInbound(false);
     69        TunnelPoolSettings outboundSettings = new TunnelPoolSettings(true, false);
    7470        _outboundExploratory = new TunnelPool(_context, this, outboundSettings, selector);
    7571       
Note: See TracChangeset for help on using the changeset viewer.