mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Add javadocs.
This commit is contained in:
@@ -43,17 +43,20 @@ public interface LifecycleManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a {@link Service} to be started and stopped.
|
||||
* Registers a {@link Service} to be started and stopped. This method
|
||||
* should be called before {@link #startServices(String)}.
|
||||
*/
|
||||
void registerService(Service s);
|
||||
|
||||
/**
|
||||
* Registers a {@link Client} to be started.
|
||||
* Registers a {@link Client} to be started. This method should be called
|
||||
* before {@link #startServices(String)}.
|
||||
*/
|
||||
void registerClient(Client c);
|
||||
|
||||
/**
|
||||
* Registers an {@link ExecutorService} to be shut down.
|
||||
* Registers an {@link ExecutorService} to be shut down. This method
|
||||
* should be called before {@link #startServices(String)}.
|
||||
*/
|
||||
void registerForShutdown(ExecutorService e);
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.briarproject.bramble.api.sync;
|
||||
import org.briarproject.bramble.api.contact.Contact;
|
||||
import org.briarproject.bramble.api.db.DbException;
|
||||
import org.briarproject.bramble.api.db.Transaction;
|
||||
import org.briarproject.bramble.api.lifecycle.LifecycleManager;
|
||||
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
|
||||
import org.briarproject.bramble.api.sync.Group.Visibility;
|
||||
|
||||
@@ -19,8 +20,17 @@ public interface ClientVersioningManager {
|
||||
*/
|
||||
int CLIENT_VERSION = 0;
|
||||
|
||||
/**
|
||||
* Registers a client that will be advertised to contacts. This method
|
||||
* should be called before {@link LifecycleManager#startServices(String)}.
|
||||
*/
|
||||
void registerClient(ClientId clientId, int clientVersion);
|
||||
|
||||
/**
|
||||
* Registers a hook that will be called when the visibility of the given
|
||||
* client changes. This method should be called before
|
||||
* {@link LifecycleManager#startServices(String)}.
|
||||
*/
|
||||
void registerClientVersioningHook(ClientId clientId, int clientVersion,
|
||||
ClientVersioningHook hook);
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.briarproject.bramble.api.sync;
|
||||
import org.briarproject.bramble.api.db.DbException;
|
||||
import org.briarproject.bramble.api.db.Metadata;
|
||||
import org.briarproject.bramble.api.db.Transaction;
|
||||
import org.briarproject.bramble.api.lifecycle.LifecycleManager;
|
||||
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
|
||||
|
||||
/**
|
||||
@@ -33,14 +34,17 @@ public interface ValidationManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the message validator for the given client.
|
||||
* Registers the message validator for the given client. This method
|
||||
* should be called before {@link LifecycleManager#startServices(String)}.
|
||||
*/
|
||||
void registerMessageValidator(ClientId c, int clientVersion,
|
||||
MessageValidator v);
|
||||
|
||||
/**
|
||||
* Sets the incoming message hook for the given client. The hook will be
|
||||
* called once for each incoming message that passes validation.
|
||||
* Registers the incoming message hook for the given client. The hook will
|
||||
* be called once for each incoming message that passes validation. This
|
||||
* method should be called before
|
||||
* {@link LifecycleManager#startServices(String)}.
|
||||
*/
|
||||
void registerIncomingMessageHook(ClientId c, int clientVersion,
|
||||
IncomingMessageHook hook);
|
||||
|
||||
Reference in New Issue
Block a user