mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Implement Service interface rather than extending it.
Whether or not a class needs to run as a service is an implementation decision.
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
package org.briarproject.api.android;
|
||||
|
||||
import org.briarproject.api.lifecycle.Service;
|
||||
import org.briarproject.api.sync.GroupId;
|
||||
|
||||
/** Manages notifications for private messages and forum posts. */
|
||||
public interface AndroidNotificationManager extends Service {
|
||||
public interface AndroidNotificationManager {
|
||||
|
||||
void showPrivateMessageNotification(GroupId g);
|
||||
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
package org.briarproject.api.plugins;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.briarproject.api.TransportId;
|
||||
import org.briarproject.api.lifecycle.Service;
|
||||
import org.briarproject.api.plugins.duplex.DuplexPlugin;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* Responsible for starting transport plugins at startup, stopping them at
|
||||
* shutdown, and providing access to plugins for exchanging invitations.
|
||||
*/
|
||||
public interface PluginManager extends Service {
|
||||
public interface PluginManager {
|
||||
|
||||
/**
|
||||
* Returns the plugin for the given transport, or null if no such plugin
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package org.briarproject.api.sync;
|
||||
|
||||
import org.briarproject.api.db.Metadata;
|
||||
import org.briarproject.api.lifecycle.Service;
|
||||
|
||||
public interface MessageValidator extends Service {
|
||||
public interface MessageValidator {
|
||||
|
||||
/**
|
||||
* Validates the given message and returns its metadata if the message
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
package org.briarproject.api.sync;
|
||||
|
||||
import org.briarproject.api.lifecycle.Service;
|
||||
|
||||
/**
|
||||
* Responsible for managing message validators and passing them messages to
|
||||
* validate.
|
||||
*/
|
||||
public interface ValidationManager extends Service {
|
||||
public interface ValidationManager {
|
||||
|
||||
/** Sets the message validator for the given client. */
|
||||
void setMessageValidator(ClientId c, MessageValidator v);
|
||||
|
||||
@@ -3,7 +3,6 @@ package org.briarproject.api.transport;
|
||||
import org.briarproject.api.TransportId;
|
||||
import org.briarproject.api.contact.ContactId;
|
||||
import org.briarproject.api.crypto.SecretKey;
|
||||
import org.briarproject.api.lifecycle.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
@@ -11,7 +10,7 @@ import java.util.Collection;
|
||||
* Responsible for managing transport keys and recognising the pseudo-random
|
||||
* tags of incoming streams.
|
||||
*/
|
||||
public interface KeyManager extends Service {
|
||||
public interface KeyManager {
|
||||
|
||||
/**
|
||||
* Informs the key manager that a new contact has been added. Derives and
|
||||
|
||||
Reference in New Issue
Block a user