mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Dedicated executors for plugins and the connection recogniser.
This commit is contained in:
@@ -4,5 +4,5 @@ import java.util.concurrent.Executor;
|
||||
|
||||
public interface BatchPluginFactory {
|
||||
|
||||
BatchPlugin createPlugin(Executor executor, BatchPluginCallback callback);
|
||||
BatchPlugin createPlugin(Executor e, BatchPluginCallback callback);
|
||||
}
|
||||
|
||||
15
api/net/sf/briar/api/plugins/PluginExecutor.java
Normal file
15
api/net/sf/briar/api/plugins/PluginExecutor.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package net.sf.briar.api.plugins;
|
||||
|
||||
import static java.lang.annotation.ElementType.PARAMETER;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import com.google.inject.BindingAnnotation;
|
||||
|
||||
/** Annotation for injecting the executor used by transport plugins. */
|
||||
@BindingAnnotation
|
||||
@Target({ PARAMETER })
|
||||
@Retention(RUNTIME)
|
||||
public @interface PluginExecutor {}
|
||||
@@ -4,5 +4,5 @@ import java.util.concurrent.Executor;
|
||||
|
||||
public interface StreamPluginFactory {
|
||||
|
||||
StreamPlugin createPlugin(Executor executor, StreamPluginCallback callback);
|
||||
StreamPlugin createPlugin(Executor e, StreamPluginCallback callback);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package net.sf.briar.api.transport;
|
||||
|
||||
import static java.lang.annotation.ElementType.PARAMETER;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import com.google.inject.BindingAnnotation;
|
||||
|
||||
/**
|
||||
* Annotation for injecting the executor for recognising incoming connections.
|
||||
*/
|
||||
@BindingAnnotation
|
||||
@Target({ PARAMETER })
|
||||
@Retention(RUNTIME)
|
||||
public @interface ConnectionRecogniserExecutor {}
|
||||
Reference in New Issue
Block a user