Interface ServerStopPerformer
-
- All Known Implementing Classes:
ScriptBasedServerStopPerformer
public interface ServerStopPerformer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getNotSupportedReason()
null when restart is supported.boolean
isSupported()
CompletableFuture<Void>
restart(Runnable beforeStopAction)
Restart the server (async operation)CompletableFuture<Void>
stop(Runnable beforeStopAction)
Stop the server (async operation)
-
-
-
Method Detail
-
stop
CompletableFuture<Void> stop(@NotNull Runnable beforeStopAction) throws ServerStopException
Stop the server (async operation)- Parameters:
beforeStopAction
- will be called only if restart attempt is successful.- Throws:
ServerStopException
-
restart
@NotNull CompletableFuture<Void> restart(@NotNull Runnable beforeStopAction) throws ServerStopException
Restart the server (async operation)- Parameters:
beforeStopAction
- will be called only if restart attempt is successful.- Throws:
ServerStopException
-
isSupported
boolean isSupported()
-
getNotSupportedReason
@Nullable String getNotSupportedReason()
null when restart is supported.
-
-