mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-11 18:29:05 +01:00
Move wake lock code to dont-kill-me-lib.
This commit is contained in:
@@ -8,9 +8,27 @@ import org.briarproject.nullsafety.NotNullByDefault;
|
||||
import java.io.File;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
/**
|
||||
* A Tor wrapper for Unix-like operating systems.
|
||||
*/
|
||||
@NotNullByDefault
|
||||
public class UnixTorWrapper extends JavaTorWrapper {
|
||||
|
||||
/**
|
||||
* @param ioExecutor The wrapper will use this executor to run IO tasks,
|
||||
* some of which may run for the lifetime of the wrapper, so the executor
|
||||
* should have an unlimited thread pool.
|
||||
* @param eventExecutor The wrapper will use this executor to call
|
||||
* {@link StateObserver#observeState(TorState)}. To ensure that state
|
||||
* changes are observed in the order they occur, this executor should have
|
||||
* a single thread (eg the app's main thread).
|
||||
* @param architecture The processor architecture of the Tor and pluggable
|
||||
* transport binaries.
|
||||
* @param torDirectory The directory where the Tor process should keep its
|
||||
* state.
|
||||
* @param torSocksPort The port number to use for Tor's SOCKS port.
|
||||
* @param torControlPort The port number to use for Tor's control port.
|
||||
*/
|
||||
public UnixTorWrapper(Executor ioExecutor,
|
||||
Executor eventExecutor,
|
||||
String architecture,
|
||||
|
||||
@@ -13,9 +13,27 @@ import java.util.concurrent.Executor;
|
||||
|
||||
import static java.util.logging.Level.INFO;
|
||||
|
||||
/**
|
||||
* A Tor wrapper for the Windows operating system.
|
||||
*/
|
||||
@NotNullByDefault
|
||||
public class WindowsTorWrapper extends JavaTorWrapper {
|
||||
|
||||
/**
|
||||
* @param ioExecutor The wrapper will use this executor to run IO tasks,
|
||||
* some of which may run for the lifetime of the wrapper, so the executor
|
||||
* should have an unlimited thread pool.
|
||||
* @param eventExecutor The wrapper will use this executor to call
|
||||
* {@link StateObserver#observeState(TorState)}. To ensure that state
|
||||
* changes are observed in the order they occur, this executor should have
|
||||
* a single thread (eg the app's main thread).
|
||||
* @param architecture The processor architecture of the Tor and pluggable
|
||||
* transport binaries.
|
||||
* @param torDirectory The directory where the Tor process should keep its
|
||||
* state.
|
||||
* @param torSocksPort The port number to use for Tor's SOCKS port.
|
||||
* @param torControlPort The port number to use for Tor's control port.
|
||||
*/
|
||||
public WindowsTorWrapper(Executor ioExecutor,
|
||||
Executor eventExecutor,
|
||||
String architecture,
|
||||
|
||||
Reference in New Issue
Block a user