Control interface for system services @author Robert Altnoeder <robert.altnoeder@linbit.com>
| 6 | * @author Robert Altnoeder <robert.altnoeder@linbit.com> |
| 7 | */ |
| 8 | public interface SystemService extends SystemServiceInfo |
| 9 | { |
| 10 | /** |
| 11 | * Changes the service instance's name |
| 12 | */ |
| 13 | void setServiceInstanceName(ServiceName instanceName); |
| 14 | |
| 15 | /** |
| 16 | * Enables the service |
| 17 | */ |
| 18 | void start() throws SystemServiceStartException; |
| 19 | |
| 20 | /** |
| 21 | * Disables the service |
| 22 | * |
| 23 | * @param jvmShutdownRef <code>True</code> iff this shutdown was initiated by the shutdown hook or another |
| 24 | * source that should end in the end of the JVM relatively soon. |
| 25 | */ |
| 26 | void shutdown(boolean jvmShutdownRef); |
| 27 | |
| 28 | /** |
| 29 | * Waits until the service has shut down or the timeout is exceeded |
| 30 | * |
| 31 | * @param timeout Timeout for the operation in milliseconds |
| 32 | * @throws java.lang.InterruptedException If the timeout is exceeded |
| 33 | */ |
| 34 | void awaitShutdown(long timeout) throws InterruptedException; |
| 35 | } |
no outgoing calls
no test coverage detected