mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-11 18:29:05 +01:00
Make MailboxManager#checkConnection() blocking and let the UI manage the executor
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
package org.briarproject.bramble.api.mailbox;
|
||||
|
||||
import org.briarproject.bramble.api.Consumer;
|
||||
import org.briarproject.bramble.api.db.DbException;
|
||||
import org.briarproject.bramble.api.db.Transaction;
|
||||
import org.briarproject.bramble.api.lifecycle.IoExecutor;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -36,13 +34,11 @@ public interface MailboxManager {
|
||||
|
||||
/**
|
||||
* Can be used by the UI to test the mailbox connection.
|
||||
* After the connection has been made, the given {@param connectionCallback}
|
||||
* will be called with true (success) or false (error).
|
||||
* In addition, a {@link OwnMailboxConnectionStatusEvent} might be broadcast
|
||||
* with a new {@link MailboxStatus}.
|
||||
* <p>
|
||||
* Note that the callback will be made on the {@link IoExecutor}.
|
||||
*
|
||||
* @return true (success) or false (error).
|
||||
* A {@link OwnMailboxConnectionStatusEvent} might be broadcast with a new
|
||||
* {@link MailboxStatus}.
|
||||
*/
|
||||
void checkConnection(Consumer<Boolean> connectionCallback);
|
||||
boolean checkConnection();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user