I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 46e7e9be authored by zzz's avatar zzz
Browse files

finals

parent d87d4eb2
No related branches found
No related tags found
No related merge requests found
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package net.i2p.i2ptunnel.streamr;
import java.util.concurrent.CopyOnWriteArrayList;
......@@ -17,6 +12,7 @@ import net.i2p.i2ptunnel.udp.*;
* @author zzz modded for I2PTunnel
*/
public class MultiSource implements Source, Sink {
public MultiSource() {
this.sinks = new CopyOnWriteArrayList<Destination>();
}
......@@ -45,20 +41,6 @@ public class MultiSource implements Source, Sink {
this.sinks.remove(sink);
}
private Sink sink;
private List<Destination> sinks;
private final List<Destination> sinks;
}
......@@ -7,9 +7,11 @@ import net.i2p.i2ptunnel.udp.*;
* @author welterde/zzz
*/
public class Pinger implements Source, Runnable {
public Pinger() {
this.thread = new Thread(this);
}
public void setSink(Sink sink) {
this.sink = sink;
}
......@@ -53,7 +55,7 @@ public class Pinger implements Source, Runnable {
}
protected Sink sink;
protected Thread thread;
protected final Thread thread;
private final Object waitlock = new Object();
protected boolean running;
protected volatile boolean running;
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package net.i2p.i2ptunnel.streamr;
import java.net.InetAddress;
......@@ -52,16 +47,7 @@ public class StreamrConsumer extends I2PTunnelUDPClientBase {
this.sink.stop();
return super.close(forced);
}
private UDPSink sink;
private Pinger pinger;
private final UDPSink sink;
private final Pinger pinger;
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package net.i2p.i2ptunnel.streamr;
// system
import java.io.File;
// i2p
import net.i2p.i2ptunnel.I2PTunnel;
import net.i2p.i2ptunnel.Logging;
import net.i2p.i2ptunnel.udp.*;
......@@ -57,17 +50,8 @@ public class StreamrProducer extends I2PTunnelUDPServerBase {
this.multi.stop();
return super.close(forced);
}
private MultiSource multi;
private UDPSource server;
private Sink subscriber;
private final MultiSource multi;
private final UDPSource server;
private final Sink subscriber;
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package net.i2p.i2ptunnel.streamr;
// system
import java.util.Set;
import net.i2p.data.Destination;
......@@ -51,15 +45,6 @@ public class Subscriber implements Sink {
}
}
private Set<Destination> subscriptions;
private MultiSource multi;
private final Set<Destination> subscriptions;
private final MultiSource multi;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment