Skip to content
Snippets Groups Projects
Verified Commit cc6fed02 authored by akwizgran's avatar akwizgran
Browse files

Add javadocs.

parent 66137d4c
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
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