Search in sources :

Example 21 with I2PThread

use of net.i2p.util.I2PThread in project i2p.i2p by i2p.

the class RouterTimestamper method startTimestamper.

public void startTimestamper() {
    if (_disabled || _initialized)
        return;
    _timestamperThread = new I2PThread(this, "Timestamper", _daemon);
    _timestamperThread.setPriority(I2PThread.MIN_PRIORITY);
    _isRunning = true;
    _timestamperThread.start();
    _context.addShutdownTask(new Shutdown());
}
Also used : I2PThread(net.i2p.util.I2PThread)

Example 22 with I2PThread

use of net.i2p.util.I2PThread in project i2p.i2p by i2p.

the class TestSwarm method connectWithPeers.

private void connectWithPeers() {
    if (_peerDestFiles != null) {
        for (int i = 0; i < _peerDestFiles.length; i++) {
            try {
                FileInputStream fin = new FileInputStream(_peerDestFiles[i]);
                Destination dest = new Destination();
                dest.readBytes(fin);
                I2PThread flooder = new I2PThread(new Flooder(dest), "Flooder+" + dest.calculateHash().toBase64().substring(0, 4));
                flooder.start();
            } catch (Exception e) {
                _log.error("Unable to read the peer from " + _peerDestFiles[i], e);
            }
        }
    }
}
Also used : Destination(net.i2p.data.Destination) I2PThread(net.i2p.util.I2PThread) FileInputStream(java.io.FileInputStream)

Example 23 with I2PThread

use of net.i2p.util.I2PThread in project i2p.i2p by i2p.

the class EstablishmentManager method startup.

public synchronized void startup() {
    _alive = true;
    I2PThread t = new I2PThread(new Establisher(), "UDP Establisher", true);
    t.start();
}
Also used : I2PThread(net.i2p.util.I2PThread)

Example 24 with I2PThread

use of net.i2p.util.I2PThread in project i2p.i2p by i2p.

the class MessageReceiver method startup.

public synchronized void startup() {
    _alive = true;
    for (int i = 0; i < _threadCount; i++) {
        I2PThread t = new I2PThread(new Runner(), "UDP message receiver " + (i + 1) + '/' + _threadCount, true);
        t.start();
    }
}
Also used : I2PThread(net.i2p.util.I2PThread)

Example 25 with I2PThread

use of net.i2p.util.I2PThread in project i2p.i2p by i2p.

the class OutboundRefiller method startup.

public void startup() {
    _alive = true;
    I2PThread t = new I2PThread(this, "UDP outbound refiller", true);
    t.start();
}
Also used : I2PThread(net.i2p.util.I2PThread)

Aggregations

I2PThread (net.i2p.util.I2PThread)35 FileInputStream (java.io.FileInputStream)3 IOException (java.io.IOException)3 BufferedInputStream (java.io.BufferedInputStream)1 BufferedOutputStream (java.io.BufferedOutputStream)1 BufferedReader (java.io.BufferedReader)1 File (java.io.File)1 FileOutputStream (java.io.FileOutputStream)1 InputStreamReader (java.io.InputStreamReader)1 OutputStream (java.io.OutputStream)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 Socket (java.net.Socket)1 SocketException (java.net.SocketException)1 HashMap (java.util.HashMap)1 Properties (java.util.Properties)1 Destination (net.i2p.data.Destination)1 I2CPMessageReader (net.i2p.data.i2cp.I2CPMessageReader)1 I2PAppThread (net.i2p.util.I2PAppThread)1 ForwardPort (org.freenetproject.ForwardPort)1 ForwardPortStatus (org.freenetproject.ForwardPortStatus)1