mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Changed the root package from net.sf.briar to org.briarproject.
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package org.briarproject.api.lifecycle;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
public interface LifecycleManager {
|
||||
|
||||
/** Registers a {@link Service} to be started and stopped. */
|
||||
public void register(Service s);
|
||||
|
||||
/**
|
||||
* Registers an {@link java.util.concurrent.ExecutorService ExecutorService}
|
||||
* to be shut down.
|
||||
*/
|
||||
public void registerForShutdown(ExecutorService e);
|
||||
|
||||
/** Starts any registered {@link Service}s. */
|
||||
public void startServices();
|
||||
|
||||
/**
|
||||
* Stops any registered {@link Service}s and shuts down any registered
|
||||
* {@link java.util.concurrent.ExecutorService ExecutorService}s.
|
||||
*/
|
||||
public void stopServices();
|
||||
|
||||
/** Waits for the database to be opened before returning. */
|
||||
public void waitForDatabase() throws InterruptedException;
|
||||
|
||||
/** Waits for all registered {@link Service}s to start before returning. */
|
||||
public void waitForStartup() throws InterruptedException;
|
||||
|
||||
/**
|
||||
* Waits for all registered {@link Service}s to stop and all registered
|
||||
* {@link java.util.concurrent.ExecutorService ExecutorService}s to shut
|
||||
* down before returning.
|
||||
*/
|
||||
public void waitForShutdown() throws InterruptedException;
|
||||
}
|
||||
Reference in New Issue
Block a user