forked from I2P_Developers/i2p.i2p
finals
This commit is contained in:
@@ -1,8 +1,3 @@
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
|
@@ -1,8 +1,3 @@
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
|
@@ -1,14 +1,7 @@
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
|
@@ -1,11 +1,5 @@
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user