Moved callback initialisation from start() to constructor so it can be

accessed outside the lock.
This commit is contained in:
akwizgran
2011-10-08 12:46:35 +01:00
parent 7eaefd97cb
commit 5f40015ec2
13 changed files with 88 additions and 101 deletions

View File

@@ -11,6 +11,7 @@ import java.util.concurrent.Executor;
import net.sf.briar.api.ContactId;
import net.sf.briar.api.TransportId;
import net.sf.briar.api.transport.stream.StreamTransportCallback;
class SimpleSocketPlugin extends SocketPlugin {
@@ -20,8 +21,9 @@ class SimpleSocketPlugin extends SocketPlugin {
private final long pollingInterval;
SimpleSocketPlugin(Executor executor, long pollingInterval) {
super(executor);
SimpleSocketPlugin(Executor executor, StreamTransportCallback callback,
long pollingInterval) {
super(executor, callback);
this.pollingInterval = pollingInterval;
}