Skip to content
Snippets Groups Projects
Commit 0c00f30d authored by bontric's avatar bontric
Browse files

add MailboxOwner sync session implementation (WIP)

parent 9835d071
No related branches found
No related tags found
No related merge requests found
......@@ -10,9 +10,13 @@ import org.briarproject.bramble.mailbox.protocol.MailboxRequestStore;
import org.briarproject.bramble.mailbox.protocol.MailboxRequestSync;
import org.briarproject.bramble.mailbox.protocol.MailboxRequestTake;
import java.io.IOException;
import java.util.concurrent.Executor;
import java.util.logging.Logger;
import static java.util.logging.Level.WARNING;
import static org.briarproject.bramble.util.LogUtils.logException;
class MailboxOwnerSession extends MailboxSession {
private static final Logger LOG =
......@@ -39,10 +43,16 @@ class MailboxOwnerSession extends MailboxSession {
@Override
public void run() {
ioExecutor.execute(() -> readRequests());
runDuplexOutgoingSession();
}
@Override
public void handleSync(MailboxRequestSync mailboxRequestSync) {
public void handleSync(MailboxRequestSync req) {
try {
handleSyncStream(req.getSyncStream());
} catch (IOException e) {
logException(LOG, WARNING, e);
}
}
@Override
......
......@@ -38,7 +38,7 @@ class PrivateMailboxSession extends MailboxSession {
@Override
public void run() {
ioExecutor.execute(() -> super.readRequests());
ioExecutor.execute(() -> runDuplexOutgoingSession());
runDuplexOutgoingSession();
}
@Override
......
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