forked from I2P_Developers/i2p.i2p
Threads: More conversions to I2PAppThread
This commit is contained in:
@ -25,6 +25,7 @@ import java.util.Properties;
|
|||||||
|
|
||||||
import net.i2p.I2PAppContext;
|
import net.i2p.I2PAppContext;
|
||||||
import net.i2p.client.naming.NamingServiceUpdater;
|
import net.i2p.client.naming.NamingServiceUpdater;
|
||||||
|
import net.i2p.util.I2PAppThread;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A thread that waits five minutes, then runs the addressbook daemon.
|
* A thread that waits five minutes, then runs the addressbook daemon.
|
||||||
@ -32,7 +33,7 @@ import net.i2p.client.naming.NamingServiceUpdater;
|
|||||||
* @author Ragnarok
|
* @author Ragnarok
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class DaemonThread extends Thread implements NamingServiceUpdater {
|
public class DaemonThread extends I2PAppThread implements NamingServiceUpdater {
|
||||||
|
|
||||||
private String[] args;
|
private String[] args;
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ import java.util.Properties;
|
|||||||
import net.i2p.I2PAppContext;
|
import net.i2p.I2PAppContext;
|
||||||
import net.i2p.app.*;
|
import net.i2p.app.*;
|
||||||
import static net.i2p.app.ClientAppState.*;
|
import static net.i2p.app.ClientAppState.*;
|
||||||
|
import net.i2p.util.I2PAppThread;
|
||||||
import net.i2p.util.PortMapper;
|
import net.i2p.util.PortMapper;
|
||||||
|
|
||||||
import org.eclipse.jetty.server.Connector;
|
import org.eclipse.jetty.server.Connector;
|
||||||
@ -109,7 +110,7 @@ public class JettyStart implements ClientApp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class Starter extends Thread {
|
private class Starter extends I2PAppThread {
|
||||||
public Starter() {
|
public Starter() {
|
||||||
super("JettyStarter");
|
super("JettyStarter");
|
||||||
changeState(STARTING);
|
changeState(STARTING);
|
||||||
@ -161,7 +162,7 @@ public class JettyStart implements ClientApp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class Stopper extends Thread {
|
private class Stopper extends I2PAppThread {
|
||||||
public Stopper() {
|
public Stopper() {
|
||||||
super("JettyStopper");
|
super("JettyStopper");
|
||||||
changeState(STOPPING);
|
changeState(STOPPING);
|
||||||
|
@ -763,7 +763,7 @@ public class LogManager implements Flushable {
|
|||||||
|
|
||||||
private static final AtomicInteger __id = new AtomicInteger();
|
private static final AtomicInteger __id = new AtomicInteger();
|
||||||
|
|
||||||
private class ShutdownHook extends Thread {
|
private class ShutdownHook extends I2PAppThread {
|
||||||
private final int _id;
|
private final int _id;
|
||||||
public ShutdownHook() {
|
public ShutdownHook() {
|
||||||
_id = __id.incrementAndGet();
|
_id = __id.incrementAndGet();
|
||||||
|
@ -51,7 +51,7 @@ public class ShellCommand {
|
|||||||
*
|
*
|
||||||
* @author hypercubus
|
* @author hypercubus
|
||||||
*/
|
*/
|
||||||
private class CommandThread extends Thread {
|
private class CommandThread extends I2PAppThread {
|
||||||
private final boolean consumeOutput;
|
private final boolean consumeOutput;
|
||||||
private final Object shellCommand;
|
private final Object shellCommand;
|
||||||
private final Result result;
|
private final Result result;
|
||||||
@ -84,7 +84,7 @@ public class ShellCommand {
|
|||||||
*
|
*
|
||||||
* @author hypercubus
|
* @author hypercubus
|
||||||
*/
|
*/
|
||||||
private static class StreamConsumer extends Thread {
|
private static class StreamConsumer extends I2PAppThread {
|
||||||
private final BufferedReader bufferedReader;
|
private final BufferedReader bufferedReader;
|
||||||
|
|
||||||
public StreamConsumer(InputStream inputStream) {
|
public StreamConsumer(InputStream inputStream) {
|
||||||
@ -115,7 +115,7 @@ public class ShellCommand {
|
|||||||
*
|
*
|
||||||
* @author hypercubus
|
* @author hypercubus
|
||||||
*/
|
*/
|
||||||
private static class StreamReader extends Thread {
|
private static class StreamReader extends I2PAppThread {
|
||||||
private final BufferedReader bufferedReader;
|
private final BufferedReader bufferedReader;
|
||||||
|
|
||||||
public StreamReader(InputStream inputStream) {
|
public StreamReader(InputStream inputStream) {
|
||||||
@ -149,7 +149,7 @@ public class ShellCommand {
|
|||||||
*
|
*
|
||||||
* @author hypercubus
|
* @author hypercubus
|
||||||
*/
|
*/
|
||||||
private static class StreamWriter extends Thread {
|
private static class StreamWriter extends I2PAppThread {
|
||||||
private final BufferedWriter bufferedWriter;
|
private final BufferedWriter bufferedWriter;
|
||||||
|
|
||||||
public StreamWriter(OutputStream outputStream) {
|
public StreamWriter(OutputStream outputStream) {
|
||||||
|
Reference in New Issue
Block a user