Search in sources :

Example 6 with I2PThread

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

the class AsyncFortunaStandalone method startup.

public void startup() {
    for (int i = 0; i < _bufferCount; i++) _emptyBuffers.offer(new AsyncBuffer(_bufferSize));
    _isRunning = true;
    _refillThread = new I2PThread(this, "PRNG");
    _refillThread.setDaemon(true);
    _refillThread.setPriority(Thread.NORM_PRIORITY - 2);
    _refillThread.start();
}
Also used : I2PThread(net.i2p.util.I2PThread)

Example 7 with I2PThread

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

the class AdminListener method runConnection.

/**
 * Handle the connection by passing it off to an AdminRunner
 */
protected void runConnection(Socket socket) throws IOException {
    AdminRunner runner = new AdminRunner(_context, socket);
    I2PThread t = new I2PThread(runner);
    t.setName("Admin Runner");
    // t.setPriority(Thread.MIN_PRIORITY);
    t.setDaemon(true);
    t.start();
}
Also used : I2PThread(net.i2p.util.I2PThread)

Example 8 with I2PThread

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

the class AdminManager method startup.

private void startup(int port) {
    if (_listener == null) {
        _listener = new AdminListener(_context, port);
        I2PThread t = new I2PThread(_listener);
        t.setName("Admin Listener:" + port);
        t.setDaemon(true);
        // t.setPriority(Thread.MIN_PRIORITY);
        t.start();
    } else {
        _listener.setPort(port);
        _listener.restart();
    }
}
Also used : I2PThread(net.i2p.util.I2PThread)

Example 9 with I2PThread

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

the class YKGenerator method start.

/**
 *  Start the background precalc thread.
 *  Must be called for normal operation.
 *  If not called, all generation happens in the foreground.
 *  Not required for unit tests.
 *
 *  @since 0.9.14
 */
public synchronized void start() {
    if (_isRunning)
        return;
    _precalcThread = new I2PThread(new YKPrecalcRunner(MIN_NUM_BUILDERS, MAX_NUM_BUILDERS), "YK Precalc", true);
    _precalcThread.setPriority(Thread.NORM_PRIORITY - 2);
    _isRunning = true;
    _precalcThread.start();
}
Also used : I2PThread(net.i2p.util.I2PThread)

Example 10 with I2PThread

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

the class Reader method startReading.

public synchronized void startReading(int numReaders) {
    for (int i = 1; i <= numReaders; i++) {
        Runner r = new Runner();
        I2PThread t = new I2PThread(r, "NTCP reader " + i + '/' + numReaders, true);
        _runners.add(r);
        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