Changeset 764a7f2


Ignore:
Timestamp:
Mar 26, 2012 12:52:06 AM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
11ff89f
Parents:
1db58de
Message:

remove unused private items (eclipse)

Files:
80 edited

Legend:

Unmodified
Added
Removed
  • apps/i2psnark/java/src/org/klomp/snark/ExtensionHandler.java

    r1db58de r764a7f2  
    168168    private static final int TYPE_REJECT = 2;
    169169
    170     private static final int CHUNK_SIZE = 16*1024;
    171 
    172170    /**
    173171     * REF: BEP 9
     
    254252    }
    255253
     254  /****
    256255    private static void sendReject(Peer peer, int piece) {
    257256        sendMessage(peer, TYPE_REJECT, piece);
    258257    }
     258  ****/
    259259
    260260    /** REQUEST and REJECT are the same except for message type */
  • apps/i2psnark/java/src/org/klomp/snark/Snark.java

    r1db58de r764a7f2  
    7272
    7373  // Whether or not to ask the user for commands while sharing
    74   private static boolean command_interpreter = true;
     74  //private static boolean command_interpreter = true;
    7575
    7676  private static final String newline = System.getProperty("line.separator");
    7777
     78/****
    7879  private static final String copyright =
    7980  "The Hunting of the Snark Project - Copyright (C) 2003 Mark J. Wielaard"
     
    9192  private static final String help =
    9293  "Commands: 'info', 'list', 'quit'.";
     94****/
    9395
    9496  // String indicating main activity
    9597  String activity = "Not started";
    9698 
     99/****
    97100  private static class OOMListener implements I2PThread.OOMEventListener {
    98101      public void outOfMemory(OutOfMemoryError err) {
     
    107110     
    108111  }
     112****/
    109113 
    110114/******** No, not maintaining a command-line client
     
    598602  }
    599603
     604/****
    600605  private static Snark parseArguments(String[] args)
    601606  {
    602607    return parseArguments(args, null, null);
    603608  }
     609****/
    604610
    605611    // Accessors
     
    908914        else if (args[i].equals("--no-commands"))
    909915          {
    910             command_interpreter = false;
     916            //command_interpreter = false;
    911917            i++;
    912918          }
     
    10781084  }
    10791085
    1080   private boolean allocating = false;
     1086  //private boolean allocating = false;
    10811087  public void storageCreateFile(Storage storage, String name, long length)
    10821088  {
     
    10861092    //System.out.print("Creating file '" + name
    10871093    //                 + "' of length " + length + ": ");
    1088     allocating = true;
     1094    //allocating = true;
    10891095  }
    10901096
     
    10941100  public void storageAllocated(Storage storage, long length)
    10951101  {
    1096     allocating = true;
     1102    //allocating = true;
    10971103    //System.out.print(".");
    1098     allocated += length;
     1104    //allocated += length;
    10991105    //if (allocated == meta.getTotalLength())
    11001106    //  System.out.println(); // We have all the disk space we need.
     
    11061112  public void storageChecked(Storage storage, int num, boolean checked)
    11071113  {
    1108     allocating = false;
     1114    //allocating = false;
    11091115    if (!allChecked && !checking)
    11101116      {
  • apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java

    r1db58de r764a7f2  
    22592259    }
    22602260
    2261     private String _(String s) {
    2262         return _manager.util().getString(s);
    2263     }
    2264 
    22652261    private String _(String s, String o) {
    22662262        return _manager.util().getString(s, o);
  • apps/i2psnark/java/src/org/klomp/snark/web/RunStandalone.java

    r1db58de r764a7f2  
    99
    1010public class RunStandalone {
    11     private Server _server;
    12    
    1311    static {
    1412        System.setProperty("org.mortbay.http.Version.paranoid", "true");
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/HTTPResponseOutputStream.java

    r1db58de r764a7f2  
    4444    private final byte _buf1[];
    4545    protected boolean _gzip;
    46     private long _dataWritten;
    4746    protected long _dataExpected;
    4847    protected String _contentType;
     
    7776        if (_headerWritten) {
    7877            out.write(buf, off, len);
    79             _dataWritten += len;
    8078            //out.flush();
    8179            return;
     
    9391                    // write out the remaining
    9492                    out.write(buf, off+i+1, len-i-1);
    95                     _dataWritten += len-i-1;
    9693                    //out.flush();
    9794                }
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelClientBase.java

    r1db58de r764a7f2  
    6565    // private byte[] pubkey;
    6666
    67     private String handlerName;
    6867    private String privKeyFile;
    6968
     
    10099        this.localPort = localPort;
    101100        this.l = l;
    102         this.handlerName = localPort + " #" + _clientId;
    103101        _ownDest = true; // == ! shared client
    104102        _context = tunnel.getContext();
     
    167165        this.localPort = localPort;
    168166        this.l = l;
    169         this.handlerName = handlerName + _clientId;
    170167        _ownDest = ownDest; // == ! shared client
    171168
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java

    r1db58de r764a7f2  
    10151015     */
    10161016    private static class InputReader {
    1017         BufferedReader _br;
    10181017        InputStream _s;
    10191018        public InputReader(InputStream s) {
    1020             _br = null;
    10211019            _s = s;
    10221020        }
     
    12131211        }
    12141212    }
    1215 
    1216     private final static String SUPPORTED_HOSTS[] = { "i2p", "www.i2p.com", "i2p."};
    12171213
    12181214    /** @param host ignored */
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/irc/DCCClientManager.java

    r1db58de r764a7f2  
    4949    private static final int MAX_INCOMING_PENDING = 10;
    5050    private static final int MAX_INCOMING_ACTIVE = 10;
    51     private static final long ACTIVE_EXPIRE = 60*60*1000;
    52 
    5351    public DCCClientManager(I2PSocketManager sktMgr, Logging logging,
    5452                            EventDispatcher dispatch, I2PTunnel tunnel) {
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/irc/I2PTunnelDCCServer.java

    r1db58de r764a7f2  
    5050    private final List<I2PSocket> _sockList;
    5151
    52     // list of client tunnels?
    53     private static long _id;
    54 
    5552    /** just to keep super() happy */
    5653    private static final InetAddress DUMMY;
     
    6865    private static final int MAX_OUTGOING_ACTIVE = 20;
    6966    private static final long OUTBOUND_EXPIRE = 30*60*1000;
    70     private static final long ACTIVE_EXPIRE = 60*60*1000;
    71 
    7267    /**
    7368     * There's no support for unsolicited incoming I2P connections,
     
    234229    }
    235230
    236     private InetAddress getListenHost(Logging l) {
    237         try {
    238             return InetAddress.getByName(getTunnel().listenHost);
    239         } catch (UnknownHostException uhe) {
    240             l.log("Could not find listen host to bind to [" + getTunnel().host + "]");
    241             _log.error("Error finding host to bind", uhe);
    242             notifyEvent("openBaseClientResult", "error");
    243             return null;
    244         }
    245     }
    246 
    247231    private void expireOutbound() {
    248232        for (Iterator<LocalAddress> iter = _outgoing.values().iterator(); iter.hasNext(); ) {
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/streamr/Subscriber.java

    r1db58de r764a7f2  
    6363   
    6464   
    65     private I2PSession sess;
    66     private Source listener;
    6765    private Set<Destination> subscriptions;
    6866    private MultiSource multi;
    69     private Source server;
    7067}
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/udpTunnel/I2PTunnelUDPClientBase.java

    r1db58de r764a7f2  
    5454    protected Destination dest = null;
    5555
    56     private boolean listenerReady = false;
    57 
    58     private ServerSocket ss;
    59 
    6056    private final Object startLock = new Object();
    61     private boolean startRunning = false;
    62 
    63     private byte[] pubkey;
    64 
    65     private String handlerName;
    66 
    6757    private Object conLock = new Object();
    68    
    69     /** How many connections will we allow to be in the process of being built at once? */
    70     private int _numConnectionBuilders;
    71     /** How long will we allow sockets to sit in the _waitingSockets map before killing them? */
    72     private int _maxWaitTime;
    7358   
    7459    private I2PSession _session;
     
    142127            }
    143128            start();
    144             startRunning = true;
    145129            startLock.notify();
    146130        }
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/udpTunnel/I2PTunnelUDPServerBase.java

    r1db58de r764a7f2  
    5151    private final Object lock = new Object();
    5252    protected Object slock = new Object();
    53 
    54     private static volatile long __serverId = 0;
    5553
    5654    protected Logging l;
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/IndexBean.java

    r1db58de r764a7f2  
    7777    private boolean _startOnLoad;
    7878    private boolean _sharedClient;
    79     private boolean _privKeyGenerate;
    8079    private boolean _removeConfirmed;
    8180    private final Set<String> _booleanOptions;
  • apps/routerconsole/java/src/net/i2p/router/web/ConfigNetHandler.java

    r1db58de r764a7f2  
    2222public class ConfigNetHandler extends FormHandler {
    2323    private String _hostname;
    24     private boolean _reseedRequested;
    2524    private boolean _saveRequested;
    2625    private boolean _recheckReachabilityRequested;
    27     private boolean _timeSyncEnabled;
    2826    private boolean _requireIntroductions;
    2927    private boolean _hiddenMode;
     
    4644    private String _outboundBurstRate;
    4745    private String _outboundBurst;
    48     private String _reseedFrom;
    49     private boolean _enableLoadTesting;
    5046    private String _sharePct;
    5147    private boolean _ratesOnly;
     
    6662   
    6763    public void setSave(String moo) { _saveRequested = true; }
    68     public void setEnabletimesync(String moo) { _timeSyncEnabled = true; }
     64    public void setEnabletimesync(String moo) { }
    6965    public void setRecheckReachability(String moo) { _recheckReachabilityRequested = true; }
    7066    public void setRequireIntroductions(String moo) { _requireIntroductions = true; }
    7167    public void setDynamicKeys(String moo) { _dynamicKeys = true; }
    72     public void setEnableloadtesting(String moo) { _enableLoadTesting = true; }
     68    public void setEnableloadtesting(String moo) { }
    7369    public void setUdpAutoIP(String mode) {
    7470        _udpAutoIP = mode;
  • apps/routerconsole/java/src/net/i2p/router/web/ConfigNetHelper.java

    r1db58de r764a7f2  
    2222    public final static String PROP_I2NP_NTCP_AUTO_IP = "i2np.ntcp.autoip";
    2323    private final static String CHECKED = " checked=\"checked\" ";
    24     private final static String DISABLED = " disabled=\"disabled\" ";
    25 
    2624    public String getUdphostname() {
    2725        return _context.getProperty(UDPTransport.PROP_EXTERNAL_HOST, "");
  • apps/routerconsole/java/src/net/i2p/router/web/ProfileOrganizerRenderer.java

    r1db58de r764a7f2  
    346346    }
    347347
    348     /**
    349      *  translate a string with a parameter
    350      *  This is a lot more expensive than _(s), so use sparingly.
    351      *
    352      *  @param s string to be translated containing {0}
    353      *    The {0} will be replaced by the parameter.
    354      *    Single quotes must be doubled, i.e. ' -> '' in the string.
    355      *  @param o parameter, not translated.
    356      *    To tranlslate parameter also, use _("foo {0} bar", _("baz"))
    357      *    Do not double the single quotes in the parameter.
    358      *    Use autoboxing to call with ints, longs, floats, etc.
    359      */
    360     private String _(String s, Object o) {
    361         return Messages.getString(s, o, _context);
    362     }
    363 
    364348    /** translate (ngettext) @since 0.8.5 */
    365349    public String ngettext(String s, String p, int n) {
  • apps/routerconsole/java/src/net/i2p/router/web/ReseedHandler.java

    r1db58de r764a7f2  
    88 */
    99public class ReseedHandler extends HelperBase {
    10     private static Reseeder _reseedRunner;
    11 
    1210    public ReseedHandler() {
    1311        this(ContextHelper.getContext(null));
  • apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java

    r1db58de r764a7f2  
    6868    private String _webAppsDir;
    6969
    70     private static final String PROP_WEBAPP_CONFIG_FILENAME = "router.webappsConfigFile";
    7170    private static final String DEFAULT_WEBAPP_CONFIG_FILENAME = "webapps.config";
    7271    private static final DigestAuthenticator authenticator = new DigestAuthenticator();
  • apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java

    r1db58de r764a7f2  
    386386        return Messages.getString(s, _context);
    387387    }
    388 
    389     /** translate a string with a parameter */
    390     private String _(String s, Object o) {
    391         return Messages.getString(s, o, _context);
    392     }
    393388}
  • apps/routerconsole/java/src/net/i2p/router/web/SummaryListener.java

    r1db58de r764a7f2  
    4747    private RrdDb _db;
    4848    private Sample _sample;
    49     private RrdMemoryBackendFactory _factory;
    5049    private SummaryRenderer _renderer;
    5150    private int _rows;
  • apps/routerconsole/java/src/net/i2p/router/web/WrapperListener.java

    r1db58de r764a7f2  
    1919 */
    2020class WrapperListener {
    21     private final RouterContext _context;
    2221    private final WrapperEventListener _listener;
    2322
     
    2928     */
    3029    public WrapperListener(RouterContext ctx) {
    31         _context = ctx;
    3230        _listener = new SignalHandler(ctx);
    3331        long mask = WrapperEventListener.EVENT_FLAG_CONTROL;
  • apps/sam/java/src/net/i2p/sam/client/SAMStreamSink.java

    r1db58de r764a7f2  
    186186        private boolean _closed;
    187187        private long _started;
    188         private long _totalReceived;
    189188        private long _lastReceivedOn;
    190189        private OutputStream _out;
     
    223222        public void received(byte data[], int offset, int len) {
    224223            if (_closed) return;
    225             _totalReceived += len;
    226224            try {
    227225                _out.write(data, offset, len);
  • apps/streaming/java/src/net/i2p/client/streaming/Connection.java

    r1db58de r764a7f2  
    10701070     */
    10711071    class ConEvent implements SimpleTimer.TimedEvent {
    1072         private Exception _addedBy; // unused?
    10731072        public ConEvent() {
    10741073            //_addedBy = new Exception("added by");
  • apps/streaming/java/src/net/i2p/client/streaming/ConnectionManager.java

    r1db58de r764a7f2  
    3737    /** Ping ID (Long) to PingRequest */
    3838    private final Map<Long, PingRequest> _pendingPings;
    39     private boolean _allowIncoming;
    4039    private boolean _throttlersInitialized;
    4140    private int _maxConcurrentStreams;
     
    495494    private static class PingRequest {
    496495        private boolean _ponged;
    497         private final Destination _peer;
    498         private final PacketLocal _packet;
    499496        private final PingNotifier _notifier;
    500497
    501498        public PingRequest(Destination peer, PacketLocal packet, PingNotifier notifier) {
    502             _peer = peer;
    503             _packet = packet;
    504499            _notifier = notifier;
    505500        }
  • apps/streaming/java/src/net/i2p/client/streaming/I2PSocketFull.java

    r1db58de r764a7f2  
    1515class I2PSocketFull implements I2PSocket {
    1616    private Connection _connection;
    17     private I2PSocket.SocketErrorListener _listener;
    1817    private Destination _remotePeer;
    1918    private Destination _localPeer;
     
    119118   
    120119    public void setSocketErrorListener(I2PSocket.SocketErrorListener lsnr) {
    121         _listener = lsnr;
    122120    }
    123121   
     
    143141     */
    144142    void destroy2() {
    145         _connection = null;
    146         _listener = null;
     143        _connection = null;
    147144    }
    148145   
  • apps/streaming/java/src/net/i2p/client/streaming/MessageInputStream.java

    r1db58de r764a7f2  
    2020 */
    2121class MessageInputStream extends InputStream {
    22     private final I2PAppContext _context;
    2322    private final Log _log;
    2423    /**
     
    5857   
    5958    public MessageInputStream(I2PAppContext ctx) {
    60         _context = ctx;
    6159        _log = ctx.logManager().getLog(MessageInputStream.class);
    6260        _readyDataBlocks = new ArrayList(4);
  • apps/susimail/src/src/i2p/susi/webmail/WebMail.java

    r1db58de r764a7f2  
    7575        private static final long serialVersionUID = 1L;
    7676       
    77         private static final int DEFAULT_PAGESIZE = 10;
    78 
    79         private static final int BUFSIZE = 4096;
    80 
    8177        private static final String DEFAULT_HOST = "127.0.0.1";
    8278        private static final int DEFAULT_POP3PORT = 7660;
     
    143139        private static final String PREV = "prev";
    144140        private static final String NEXT = "next";
    145         private static final String NEXTUNREAD = "nextunread";
    146 
    147141        private static final String SORT_ID = "sort_id";
    148142        private static final String SORT_SENDER = "sort_sender";
     
    163157        private static final String CONFIG_PORTS_SMTP = "ports.smtp";
    164158
    165         private static final String CONFIG_FAST_START = "fast.start";
    166        
    167159        private static final String CONFIG_SENDER_FIXED = "sender.fixed";
    168160        private static final String CONFIG_SENDER_DOMAIN = "sender.domain";
     
    175167        private static final String spacer = "&nbsp;&nbsp;&nbsp;";
    176168        private static final String thSpacer = "<th>&nbsp;</th>\n";
    177         private static final String thTags = "</th>\n<th>\n";
    178        
    179169        /**
    180170         * sorts Mail objects by id field
     
    371361        {
    372362                return "" + label + "&nbsp;<a href=\"" + myself + "?" + name + "=up\"><img src=\"3up.png\" border=\"0\" alt=\"^\"></a><a href=\"" + myself + "?" + name + "=down\"><img src=\"3down.png\" border=\"0\" alt=\"v\"></a>";
    373         }
    374         /**
    375          * prints debug message as a html comment
    376          *
    377          * @param out
    378          * @param msg
    379          */
    380         private static void debug( PrintWriter out, String msg )
    381         {
    382                 out.println( "<!-- DEBUG: " + msg + " -->" );
    383363        }
    384364        /**
  • apps/susimail/src/src/i2p/susi/webmail/pop3/POP3MailBox.java

    r1db58de r764a7f2  
    403403        }
    404404       
    405         /**
    406          * send command to pop3 server (and expect single line answer), if any
    407          * exception occurs, reconnect and try again
    408          *
    409          * @param cmd command to send
    410          * @return true if command was successful (+OK)
    411          */
    412         private boolean sendCmd1(String cmd) {
    413                 boolean result = false;
    414 
    415                 synchronized (synchronizer) {
    416 
    417                         if (!isConnected())
    418                                 connect();
    419 
    420                         try {
    421                                 result = sendCmd1a(cmd);
    422                         }
    423                         catch (Exception e) {
    424                                 Debug.debug(Debug.ERROR, "Exception: " + e.getCause());
    425                                 Debug.debug(Debug.ERROR, "trying to reconnect" );
    426                                 connect();
    427                                 try {
    428                                         result = sendCmd1a(cmd);
    429                                 } catch (IOException e2) {
    430                                         Debug.debug(Debug.ERROR, "reconnect failed: " + e2.getCause());
    431                                 }
    432                         }
    433                 }
    434                 return result;
    435         }
    436405        /**
    437406         * send command to pop3 server (and expect single line answer)
  • core/java/src/net/i2p/client/I2PSessionImpl2.java

    r1db58de r764a7f2  
    226226    }
    227227   
    228     private static final int NUM_TAGS = 50;
    229 
    230228    /**
    231229     * @param keyUsed unused - no end-to-end crypto
  • core/java/src/net/i2p/client/RequestLeaseSetMessageHandler.java

    r1db58de r764a7f2  
    103103        private final SigningPublicKey _signingPubKey;
    104104        private final SigningPrivateKey _signingPrivKey;
    105         private final Destination _dest;
    106 
    107105        public LeaseInfo(Destination dest) {
    108             _dest = dest;
    109106            Object encKeys[] = KeyGenerator.getInstance().generatePKIKeypair();
    110107            Object signKeys[] = KeyGenerator.getInstance().generateSigningKeypair();
  • core/java/src/net/i2p/client/naming/BlockfileNamingService.java

    r1db58de r764a7f2  
    10001000    }
    10011001
     1002  /****
    10021003    private void dumpDB() {
    10031004        synchronized(_bf) {
     
    10291030        }
    10301031    }
     1032  ****/
    10311033
    10321034    private void close() {
  • core/java/src/net/i2p/crypto/CryptixRijndael_Algorithm.java

    r1db58de r764a7f2  
    829829     * @return true if the arrays have identical contents
    830830     */
     831  /****
    831832    private static final boolean areEqual(byte[] a, byte[] b) {
    832833        int aLength = a.length;
     
    836837        return true;
    837838    }
     839  ****/
    838840
    839841    /**
     
    841843     * digit first) corresponding to the lowest 8 bits of <i>n</i>.
    842844     */
     845  /****
    843846    private static final String byteToString(int n) {
    844847        char[] buf = { _HEX_DIGITS[(n >>> 4) & 0x0F], _HEX_DIGITS[n & 0x0F]};
    845848        return new String(buf);
    846849    }
     850  ****/
    847851
    848852    /**
  • core/java/src/net/i2p/crypto/DSAEngine.java

    r1db58de r764a7f2  
    454454    }
    455455
    456     private static final int RUNS = 1000;
     456    //private static final int RUNS = 1000;
    457457
    458458    /**
  • core/java/src/net/i2p/crypto/SHA1.java

    r1db58de r764a7f2  
    738738    }
    739739
    740     private static final int RUNS = 100000;
     740    //private static final int RUNS = 100000;
    741741
    742742    /**
  • core/java/src/net/i2p/crypto/SHA256Generator.java

    r1db58de r764a7f2  
    133133    }
    134134
    135     private static final int RUNS = 100000;
     135    //private static final int RUNS = 100000;
    136136
    137137    /**
  • core/java/src/net/i2p/crypto/TransientSessionKeyManager.java

    r1db58de r764a7f2  
    10391039         *  Caller must synch.
    10401040         */
    1041         public boolean contains(SessionTag tag) {
    1042             return _sessionTags.contains(tag);
    1043         }
    1044 
    1045         /**
    1046          *  Caller must synch.
    1047          */
    10481041        public void consume(SessionTag tag) {
    10491042            _sessionTags.remove(tag);
  • core/java/src/net/i2p/data/Base32.java

    r1db58de r764a7f2  
    5757
    5858    private final static byte BAD_ENCODING = -9; // Indicates error in encoding
    59     private final static byte EQUALS_SIGN_ENC = -1; // Indicates equals sign in encoding
    60 
    6159    /** Defeats instantiation. */
    6260    private Base32() { // nop
  • core/java/src/net/i2p/data/Base64.java

    r1db58de r764a7f2  
    9393    /** The equals sign (=) as a byte. */
    9494    private final static byte EQUALS_SIGN = (byte) '=';
    95 
    96     /** The new line character (\n) as a byte. */
    97     private final static byte NEW_LINE = (byte) '\n';
    9895
    9996    /** The 64 valid Base64 values. */
     
    160157    };
    161158
    162     private final static byte BAD_ENCODING = -9; // Indicates error in encoding
    163159    private final static byte WHITE_SPACE_ENC = -5; // Indicates white space in encoding
    164160    private final static byte EQUALS_SIGN_ENC = -1; // Indicates equals sign in encoding
     
    558554******/
    559555
    560     /**
    561      * Encodes a string in Base64 notation with line breaks
    562      * after every 75 Base64 characters.
    563      *
    564      * @param s the string to encode
    565      * @param breakLines Break lines at 80 characters or less.
    566      * @return the encoded string
    567      * @since 1.3
    568      */
    569     private static String encodeString(String s, boolean breakLines) {
    570         byte src[] = new byte[s.length()];
    571         for (int i = 0; i < src.length; i++)
    572             src[i] = (byte)(s.charAt(i) & 0xFF);
    573         return encodeBytes(src, breakLines);
    574     } // end encodeString
     556   
    575557
    576558    /* ********  D E C O D I N G   M E T H O D S  ******** */
  • core/java/src/net/i2p/data/i2cp/RequestLeaseSetMessage.java

    r1db58de r764a7f2  
    160160        private TunnelId _tunnelId;
    161161
    162         public TunnelEndpoint() {
    163         }
    164 
    165162        public TunnelEndpoint(Hash router, TunnelId id) {
    166163            _router = router;
     
    172169        }
    173170
    174         public void setRouter(Hash router) {
    175             _router = router;
    176         }
    177 
    178171        public TunnelId getTunnelId() {
    179172            return _tunnelId;
    180173        }
    181 
    182         public void setTunnelId(TunnelId tunnelId) {
    183             _tunnelId = tunnelId;
    184         }
    185174    }
    186175}
  • core/java/src/net/i2p/util/EepPost.java

    r1db58de r764a7f2  
    2020 */
    2121public class EepPost {
    22     private I2PAppContext _context;
    2322    private Log _log;
    2423    private static final String CRLF = "\r\n";
     
    2827    }
    2928    public EepPost(I2PAppContext ctx) {
    30         _context = ctx;
    3129        _log = ctx.logManager().getLog(EepPost.class);
    3230    }
  • core/java/src/net/i2p/util/Log.java

    r1db58de r764a7f2  
    203203
    204204    private static final class LogScope {
    205         private final String _scopeName;
    206         private final Class _scopeClass;
    207205        private final String _scopeCache;
    208206
    209207        public LogScope(String name, Class cls) {
    210             _scopeName = name;
    211             _scopeClass = cls;
    212208            _scopeCache = getScope(name, cls);
    213209        }
  • core/java/src/net/i2p/util/LogWriter.java

    r1db58de r764a7f2  
    3232    private volatile Writer _currentOut;
    3333    private int _rotationNum = -1;
    34     private String _logFilenamePattern;
    3534    private File _currentFile;
    3635    private final LogManager _manager;
  • core/java/src/net/i2p/util/ResettableGZIPInputStream.java

    r1db58de r764a7f2  
    2121public class ResettableGZIPInputStream extends InflaterInputStream {
    2222    private static final int FOOTER_SIZE = 8; // CRC32 + ISIZE
    23     private static final boolean DEBUG = false;
    2423    /** See below for why this is necessary */
    2524    private final ExtraByteInputStream _extraByteInputStream;
    2625    /** keep a typesafe copy of this */
    2726    private final LookaheadInputStream _lookaheadStream;
    28     private final InputStream _sequenceStream = null;
    2927    private final CRC32 _crc32;
    3028    private final byte _buf1[] = new byte[1];
     
    180178    }
    181179
    182     private long getCurrentCRCVal() { return _crc32.getValue(); }
    183    
    184180    private void verifyFooter() throws IOException {
    185181        byte footer[] = _lookaheadStream.getFooter();
  • router/java/src/net/i2p/router/JobQueueRunner.java

    r1db58de r764a7f2  
    99    private boolean _keepRunning;
    1010    private final int _id;
    11     private long _numJobs;
    1211    private Job _currentJob;
    1312    private Job _lastJob;
  • router/java/src/net/i2p/router/MessageHistory.java

    r1db58de r764a7f2  
    7474    }
    7575
    76     private void setDoLog(boolean log) { _doLog = log; }
    7776    public boolean getDoLog() { return _doLog; }
    7877   
  • router/java/src/net/i2p/router/MessageStateMonitor.java

    r1db58de r764a7f2  
    1010public class MessageStateMonitor {
    1111    private Log _log;
    12     private RouterContext _context;
    1312    private volatile int _inboundLiveCount;
    1413    private volatile int _inboundReadCount;
    15     private volatile int _inboundFinalizedCount;
    1614    private volatile int _outboundLiveCount;
    1715    private volatile int _outboundDiscardedCount;
    1816   
    1917    public MessageStateMonitor(RouterContext context) {
    20         _context = context;
    2118        _log = context.logManager().getLog(MessageStateMonitor.class);
    2219        _inboundLiveCount = 0;
    2320        _inboundReadCount = 0;
    24         _inboundFinalizedCount = 0;
    2521        _outboundLiveCount = 0;
    2622        _outboundDiscardedCount = 0;
     
    3834    public void inboundMessageFinalized() {
    3935        _inboundReadCount--;
    40         _inboundFinalizedCount++;
    4136        logStatus("inboundFinalized ");
    4237    }
  • router/java/src/net/i2p/router/RouterThrottleImpl.java

    r1db58de r764a7f2  
    2525     */
    2626    private static int JOB_LAG_LIMIT = 2*1000;
    27     /**
    28      * Arbitrary hard limit - if we throttle our network connection this many
    29      * times in the previous 2 minute period, don't accept requests to
    30      * participate in tunnels.
    31      *
    32      */
    33     private static int THROTTLE_EVENT_LIMIT = 30;
    34    
    3527    private static final String PROP_MAX_TUNNELS = "router.maxParticipatingTunnels";
    3628    private static final int DEFAULT_MAX_TUNNELS = 5000;
    37     private static final String PROP_DEFAULT_KBPS_THROTTLE = "router.defaultKBpsThrottle";
    3829    private static final String PROP_MAX_PROCESSINGTIME = "router.defaultProcessingTimeThrottle";
    3930
  • router/java/src/net/i2p/router/client/ClientManager.java

    r1db58de r764a7f2  
    5353    private static final String PROP_ENABLE_SSL = "i2cp.SSL";
    5454
    55     /** ms to wait before rechecking for inbound messages to deliver to clients */
    56     private final static int INBOUND_POLL_INTERVAL = 300;
    57    
    5855    public ClientManager(RouterContext context, int port) {
    5956        _ctx = context;
  • router/java/src/net/i2p/router/client/MessageReceivedJob.java

    r1db58de r764a7f2  
    2525    private Log _log;
    2626    private ClientConnectionRunner _runner;
    27     private Destination _to;
    28     private Destination _from;
    2927    private Payload _payload;
    3028    public MessageReceivedJob(RouterContext ctx, ClientConnectionRunner runner, Destination toDest, Destination fromDest, Payload payload) {
     
    3230        _log = ctx.logManager().getLog(MessageReceivedJob.class);
    3331        _runner = runner;
    34         _to = toDest;
    35         _from = fromDest;
    3632        _payload = payload;
    3733    }
  • router/java/src/net/i2p/router/client/RequestLeaseSetJob.java

    r1db58de r764a7f2  
    3030    private final Log _log;
    3131    private final ClientConnectionRunner _runner;
    32     private final LeaseSet _ls;
    33     private final long _expiration;
    34     private final Job _onCreate;
    35     private final Job _onFail;
    3632    private final LeaseRequestState _requestState;
    3733   
     
    4036        _log = ctx.logManager().getLog(RequestLeaseSetJob.class);
    4137        _runner = runner;
    42         _ls = set;
    43         _expiration = expiration;
    44         _onCreate = onCreate;
    45         _onFail = onFail;
    4638        _requestState = state;
    4739        ctx.statManager().createRateStat("client.requestLeaseSetSuccess", "How frequently the router requests successfully a new leaseSet?", "ClientMessages", new long[] { 60*60*1000 });
  • router/java/src/net/i2p/router/message/GarlicMessageReceiver.java

    r1db58de r764a7f2  
    3333    private final GarlicMessageParser _parser;
    3434   
    35     private final static int FORWARD_PRIORITY = 50;
    36    
    3735    public interface CloveReceiver {
    3836        public void handleClove(DeliveryInstructions instructions, I2NPMessage data);
  • router/java/src/net/i2p/router/message/HandleGarlicMessageJob.java

    r1db58de r764a7f2  
    3535    //private GarlicMessageParser _parser;
    3636   
    37     private final static int FORWARD_PRIORITY = 50;
    38    
    3937    /**
    4038     *  @param from ignored
  • router/java/src/net/i2p/router/message/OutboundClientMessageOneShotJob.java

    r1db58de r764a7f2  
    7878    private final static long OVERALL_TIMEOUT_MS_MIN = 8*1000;
    7979   
    80     /** priority of messages, that might get honored some day... */
    81     private final static int SEND_PRIORITY = 500;
    82    
    8380    /**
    8481     * If the client's config specifies shouldBundleReplyInfo=true, messages sent from
  • router/java/src/net/i2p/router/networkdb/HandleDatabaseLookupMessageJob.java

    r1db58de r764a7f2  
    3838    private Log _log;
    3939    private DatabaseLookupMessage _message;
    40     private RouterIdentity _from;
    41     private Hash _fromHash;
    4240    private final static int MAX_ROUTERS_RETURNED = 3;
    4341    private final static int CLOSENESS_THRESHOLD = 8; // FNDF.MAX_TO_FLOOD + 1
     
    5553        _log = getContext().logManager().getLog(HandleDatabaseLookupMessageJob.class);
    5654        _message = receivedMessage;
    57         _from = from;
    58         _fromHash = fromHash;
    5955    }
    6056   
  • router/java/src/net/i2p/router/networkdb/HandleDatabaseStoreMessageJob.java

    r1db58de r764a7f2  
    3333    private Hash _fromHash;
    3434
    35     private static final int ACK_TIMEOUT = 15*1000;
    36     private static final int ACK_PRIORITY = 100;
    37    
    3835    public HandleDatabaseStoreMessageJob(RouterContext ctx, DatabaseStoreMessage receivedMessage, RouterIdentity from, Hash fromHash) {
    3936        super(ctx);
  • router/java/src/net/i2p/router/networkdb/kademlia/FloodSearchJob.java

    r1db58de r764a7f2  
    8787    protected static final int CONCURRENT_SEARCHES = 2;
    8888    private static final int FLOOD_SEARCH_TIME_FACTOR = 2;
    89     private static final int FLOOD_SEARCH_TIME_MIN = 30*1000;
    90 
    9189    /**
    9290     *  Deprecated, unused, see FOSJ override
  • router/java/src/net/i2p/router/networkdb/kademlia/FloodfillPeerSelector.java

    r1db58de r764a7f2  
    292292        }
    293293
    294         /**
    295          *  @return unsorted list of all with the 'f' mark in their netdb
    296          *          except for shitlisted ones.
    297          */
    298         public List<Hash> getFloodfillParticipants() { return _floodfillMatches; }
    299 
    300294        private static final int EXTRA_MATCHES = 100;
    301295        public void add(Hash entry) {
  • router/java/src/net/i2p/router/networkdb/kademlia/HandleFloodfillDatabaseStoreMessageJob.java

    r1db58de r764a7f2  
    3636    private FloodfillNetworkDatabaseFacade _facade;
    3737
    38     private static final int ACK_TIMEOUT = 15*1000;
    39     private static final int ACK_PRIORITY = 100;
    40    
    4138    public HandleFloodfillDatabaseStoreMessageJob(RouterContext ctx, DatabaseStoreMessage receivedMessage, RouterIdentity from, Hash fromHash, FloodfillNetworkDatabaseFacade facade) {
    4239        super(ctx);
  • router/java/src/net/i2p/router/networkdb/kademlia/KBucketImpl.java

    r1db58de r764a7f2  
    4444    /** when did we last shake things up */
    4545    private long _lastShuffle;
    46     private static final int SHUFFLE_DELAY = 10*60*1000;
    4746    private I2PAppContext _context;
    4847   
  • router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java

    r1db58de r764a7f2  
    408408        }
    409409        return rv;
    410     }
    411 
    412     /* aparently, not used?? should be public if used elsewhere. */
    413     private class CountLeaseSets implements SelectionCollector {
    414         private int _count;
    415         public int size() { return _count; }
    416         public void add(Hash entry) {
    417             if (_ds == null) return;
    418             DatabaseEntry o = _ds.get(entry);
    419             if (o != null && o.getType() == DatabaseEntry.KEY_TYPE_LEASESET)
    420                 _count++;
    421         }
    422410    }
    423411
  • router/java/src/net/i2p/router/networkdb/kademlia/PersistentDataStore.java

    r1db58de r764a7f2  
    203203                _context.statManager().addRateData("netDb.writeClobber", pending);
    204204            _context.statManager().addRateData("netDb.writePending", pending);
    205         }
    206 
    207         /** check to see if it's in the write queue */
    208         public DatabaseEntry get(Hash key) {
    209             return _keys.get(key);
    210205        }
    211206
     
    503498    }
    504499   
    505     private static Hash getLeaseSetHash(String filename) {
    506         return getHash(filename, LEASESET_PREFIX, LEASESET_SUFFIX);
    507     }
    508    
    509500    private static Hash getRouterInfoHash(String filename) {
    510501        return getHash(filename, ROUTERINFO_PREFIX, ROUTERINFO_SUFFIX);
  • router/java/src/net/i2p/router/networkdb/kademlia/RepublishLeaseSetJob.java

    r1db58de r764a7f2  
    2323public class RepublishLeaseSetJob extends JobImpl {
    2424    private final Log _log;
    25     private final static long REPUBLISH_LEASESET_DELAY = 5*60*1000;
    2625    public final static long REPUBLISH_LEASESET_TIMEOUT = 60*1000;
    2726    private final static int RETRY_DELAY = 20*1000;
  • router/java/src/net/i2p/router/networkdb/kademlia/SearchJob.java

    r1db58de r764a7f2  
    4747    private final long _timeoutMs;
    4848    private final boolean _keepStats;
    49     private final boolean _isLease;
    5049    private Job _pendingRequeueJob;
    5150    private final PeerSelector _peerSelector;
     
    5756   
    5857    private static final int SEARCH_BREDTH = 3; // 10 peers at a time
    59     private static final int SEARCH_PRIORITY = 400; // large because the search is probably for a real search
    6058    /** only send the 10 closest "dont tell me about" refs */
    6159    static final int MAX_CLOSEST = 10;
     
    9795        _timeoutMs = timeoutMs;
    9896        _keepStats = keepStats;
    99         _isLease = isLease;
    10097        _deferredSearches = new ArrayList(0);
    10198        _peerSelector = facade.getPeerSelector();
     
    760757        public Job getOnFail() { return _onFail; }
    761758        public long getExpiration() { return _expiration; }
    762         public boolean getIsLease() { return _isLease; }
    763759    }
    764760   
  • router/java/src/net/i2p/router/networkdb/kademlia/StoreJob.java

    r1db58de r764a7f2  
    4444    private final static int PARALLELIZATION = 4; // how many sent at a time
    4545    private final static int REDUNDANCY = 4; // we want the data sent to 6 peers
    46     /**
    47      * additionally send to 1 outlier(s), in case all of the routers chosen in our
    48      * REDUNDANCY set are attacking us by accepting DbStore messages but dropping
    49      * the data. 
    50      *
    51      * TODO: um, honor this.  make sure we send to this many peers that aren't
    52      * closest to the key.
    53      *
    54      */
    55     private final static int EXPLORATORY_REDUNDANCY = 1;
    5646    private final static int STORE_PRIORITY = 100;
    5747   
  • router/java/src/net/i2p/router/networkdb/reseed/Reseeder.java

    r1db58de r764a7f2  
    502502    }
    503503
    504     /**
    505      *  Mark a string for extraction by xgettext and translation.
    506      *  Use this only in static initializers.
    507      *  It does not translate!
    508      *  @return s
    509      */
    510     private static final String _x(String s) {
    511         return s;
    512     }
    513 
    514504    private static final String BUNDLE_NAME = "net.i2p.router.web.messages";
    515505
  • router/java/src/net/i2p/router/peermanager/PeerTestJob.java

    r1db58de r764a7f2  
    3333    private boolean _keepTesting;
    3434    private static final long DEFAULT_PEER_TEST_DELAY = 5*60*1000;
    35     private static final int TEST_PRIORITY = 100;
    36    
    3735    /** Creates a new instance of PeerTestJob */
    3836    public PeerTestJob(RouterContext context) {
  • router/java/src/net/i2p/router/peermanager/ProfileManagerImpl.java

    r1db58de r764a7f2  
    148148    }
    149149   
    150    
    151     private int getSlowThreshold() {
    152         // perhaps we should have this compare vs. tunnel.testSuccessTime?
    153         return 5*1000;
    154     }
    155150   
    156151    /**
  • router/java/src/net/i2p/router/transport/FIFOBandwidthLimiter.java

    r1db58de r764a7f2  
    809809            init(0, 0, null);
    810810        }
    811         public SimpleRequest(int in, int out, String target) {
    812             satisfiedBuffer = new ArrayList(1);
    813             init(in, out, target);
    814         }
    815811        public SimpleRequest(int in, int out, String target, CompleteListener lsnr, Object attachment) {
    816812            satisfiedBuffer = new ArrayList(1);
     
    831827            _requestTime = now();
    832828        }
    833         public Object getAvailabilityMonitor() { return SimpleRequest.this; }
    834829        public String getRequestName() { return "Req" + _requestId + " to " + _target; }
    835830        public long getRequestTime() { return _requestTime; }
     
    874869        }
    875870        int getAllocationsSinceWait() { return _waited ? _allocationsSinceWait : 0; }
    876         void allocateAll() {
    877             _inAllocated = _inTotal;
    878             _outAllocated = _outTotal;
    879             if (_lsnr == null)
    880                 _allocationsSinceWait++;
    881             if (_log.shouldLog(Log.DEBUG)) _log.debug("allocate all");
    882             notifyAllocation();
    883         }
    884871        void allocateBytes(int in, int out) {
    885872            _inAllocated += in;
  • router/java/src/net/i2p/router/transport/TransportManager.java

    r1db58de r764a7f2  
    193193   
    194194    int getTransportCount() { return _transports.size(); }
    195    
    196     private boolean isSupported(Set addresses, Transport t) {
    197         for (Iterator iter = addresses.iterator(); iter.hasNext(); ) {
    198             RouterAddress addr = (RouterAddress)iter.next();
    199             if (addr.getTransportStyle().equals(t.getStyle()))
    200                 return true;
    201         }
    202         return false;
    203     }
    204195   
    205196    public int countActivePeers() {
  • router/java/src/net/i2p/router/transport/ntcp/EstablishState.java

    r1db58de r764a7f2  
    9494    /** bytes received so far */
    9595    private int _received;
    96     /** bytes sent so far */
    97     private int _sent;
    98 
    9996    private byte _extra[];
    10097
  • router/java/src/net/i2p/router/transport/ntcp/Writer.java

    r1db58de r764a7f2  
    1515 */
    1616class Writer {
    17     private final RouterContext _context;
    1817    private final Log _log;
    1918    private final List<NTCPConnection> _pendingConnections;
     
    2322   
    2423    public Writer(RouterContext ctx) {
    25         _context = ctx;
    2624        _log = ctx.logManager().getLog(getClass());
    2725        _pendingConnections = new ArrayList(16);
  • router/java/src/net/i2p/router/transport/udp/PacketBuilder.java

    r1db58de r764a7f2  
    432432    }
    433433
    434     private static final int ACK_PRIORITY = 1;
    435    
    436434    /**
    437435     *  Build the ack packet. The list need not be sorted into full and partial;
  • router/java/src/net/i2p/router/transport/udp/PeerState.java

    r1db58de r764a7f2  
    181181    private int _packetsPeriodRetransmitted;
    182182    private int _packetRetransmissionRate;
    183     /** at what time did we last break off the retransmission counter period */
    184     private long _retransmissionPeriodStart;
    185183    /** how many dup packets were received within the last RETRANSMISSION_PERIOD_WIDTH packets */
    186184    private long _packetsReceivedDuplicate;
  • router/java/src/net/i2p/router/transport/udp/UDPReceiver.java

    r1db58de r764a7f2  
    188188    }
    189189   
     190  /****
    190191    private class ArtificiallyDelayedReceive implements SimpleTimer.TimedEvent {
    191192        private UDPPacket _packet;
     
    193194        public void timeReached() { doReceive(_packet); }
    194195    }
     196  ****/
    195197   
    196198    /**
  • router/java/src/net/i2p/router/transport/udp/UDPTransport.java

    r1db58de r764a7f2  
    9999
    100100    private static final int DROPLIST_PERIOD = 10*60*1000;
    101     private static final int MAX_DROPLIST_SIZE = 256;
    102    
    103101    public static final String STYLE = "SSU";
    104102    public static final String PROP_INTERNAL_PORT = "i2np.udp.internalPort";
     
    14571455    }
    14581456
    1459     private static final int DROP_INACTIVITY_TIME = 60*1000;
    1460    
    14611457    public void failed(OutboundMessageState msg) { failed(msg, true); }
    14621458    void failed(OutboundMessageState msg, boolean allowPeerFailure) {
     
    22192215    }
    22202216    private static final DecimalFormat _pctFmt = new DecimalFormat("#0.0%");
    2221     private static final String formatPct(double pct) {
    2222         synchronized (_pctFmt) {
    2223             return _pctFmt.format(pct);
    2224         }
    2225     }
    2226    
    2227    
    22282217    private static final String BUNDLE_NAME = "net.i2p.router.web.messages";
    22292218
     
    23112300        }
    23122301    }
    2313    
    2314     /**
    2315      * If we haven't had a non-unknown test result in 5 minutes, we really dont know.  Otherwise,
    2316      * when we receive an unknown we should ignore that value and try again (with different peers)
    2317      *
    2318      */
    2319     private static final long STATUS_GRACE_PERIOD = 5*60*1000;
    2320     private long _statusLastCalled;
    2321     private short _lastStatus = CommSystemFacade.STATUS_UNKNOWN;
    23222302   
    23232303    void setReachabilityStatus(short status) {
     
    23562336                break;
    23572337        }
    2358         _statusLastCalled = now;
    2359         _lastStatus = status;
    23602338        if ( (status != old) && (status != CommSystemFacade.STATUS_UNKNOWN) ) {
    23612339            if (_log.shouldLog(Log.INFO))
     
    24052383    }
    24062384   
    2407     private static final String PROP_SHOULD_TEST = "i2np.udp.shouldTest";
    2408    
    24092385    private boolean shouldTest() {
    24102386        return ! _context.router().isHidden();
  • router/java/src/net/i2p/router/tunnel/InboundMessageDistributor.java

    r1db58de r764a7f2  
    3232    private final Hash _client;
    3333    private final GarlicMessageReceiver _receiver;
    34    
    35     private static final int MAX_DISTRIBUTE_TIME = 10*1000;
    3634   
    3735    public InboundMessageDistributor(RouterContext ctx, Hash client) {
  • router/java/src/net/i2p/router/tunnel/TrivialPreprocessor.java

    r1db58de r764a7f2  
    144144    private static final byte MASK_IS_SUBSEQUENT = FragmentHandler.MASK_IS_SUBSEQUENT;
    145145    /** how should this be delivered?  shift this 5 the right and get TYPE_* */
    146     private static final byte MASK_TYPE = FragmentHandler.MASK_TYPE;
     146    //private static final byte MASK_TYPE = FragmentHandler.MASK_TYPE;
    147147    /** is this the first of a fragmented message? */
    148148    private static final byte MASK_FRAGMENTED = FragmentHandler.MASK_FRAGMENTED;
  • router/java/src/net/i2p/router/tunnel/pool/BuildRequestor.java

    r1db58de r764a7f2  
    187187    /** 5 (~2600 bytes) fits nicely in 3 tunnel messages */
    188188    private static final int SHORT_RECORDS = 5;
    189     private static final int LONG_RECORDS = TunnelBuildMessage.MAX_RECORD_COUNT;
    190189    private static final VersionComparator _versionComparator = new VersionComparator();
    191190    private static final List<Integer> SHORT_ORDER = new ArrayList(SHORT_RECORDS);
  • router/java/src/net/i2p/router/tunnel/pool/PooledTunnelCreatorConfig.java

    r1db58de r764a7f2  
    1616    private TunnelPool _pool;
    1717    private TestJob _testJob;
    18     // private Job _expireJob;
    19     // private TunnelInfo _pairedTunnel;
    20     private boolean _live;
    21    
    2218    /** Creates a new instance of PooledTunnelCreatorConfig */
    2319   
     
    3531            _testJob.testSuccessful(ms);
    3632        super.testSuccessful(ms);
    37         _live = true;
    3833    }
    3934   
     
    4136    public void testJobSuccessful(int ms) {
    4237        super.testSuccessful(ms);
    43         _live = true;
    4438    }
    4539   
  • router/java/src/net/i2p/router/tunnel/pool/TunnelPeerSelector.java

    r1db58de r764a7f2  
    338338    }
    339339   
    340     private static final long DONT_EXCLUDE_PERIOD = 15*60*1000;
    341340    /** 0.7.8 and earlier had major message corruption bugs */
    342341    private static final String MIN_VERSION = "0.7.9";
Note: See TracChangeset for help on using the changeset viewer.