Class ScriptBasedServerStopPerformer
- java.lang.Object
-
- jetbrains.buildServer.serverSide.restart.ScriptBasedServerStopPerformer
-
- All Implemented Interfaces:
ServerStopPerformer
,TeamCityServerStartupScript
public class ScriptBasedServerStopPerformer extends Object implements ServerStopPerformer, TeamCityServerStartupScript
-
-
Constructor Summary
Constructors Constructor Description ScriptBasedServerStopPerformer(EventDispatcher<BuildServerListener> events, SecurityContextEx securityContext, ServerShutdownProcessTerminator processTerminator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getNotSupportedReason()
null when restart is supported.File
getStartupScriptPath()
Returns the path to the teamcity-server.bat/sh script if the server was started using this script, null otherwiseboolean
isSupported()
CompletableFuture<Void>
restart(Runnable beforeStopAction)
Restart the server (async operation)CompletableFuture<Void>
stop(Runnable beforeStopAction)
Stop the server (async operation)
-
-
-
Constructor Detail
-
ScriptBasedServerStopPerformer
public ScriptBasedServerStopPerformer(@NotNull EventDispatcher<BuildServerListener> events, @NotNull SecurityContextEx securityContext, @NotNull ServerShutdownProcessTerminator processTerminator)
-
-
Method Detail
-
stop
public CompletableFuture<Void> stop(@NotNull Runnable beforeStopAction) throws ServerStopException
Description copied from interface:ServerStopPerformer
Stop the server (async operation)- Specified by:
stop
in interfaceServerStopPerformer
- Parameters:
beforeStopAction
- will be called only if restart attempt is successful.- Throws:
ServerStopException
-
restart
@NotNull public CompletableFuture<Void> restart(@NotNull Runnable beforeStopAction) throws ServerStopException
Description copied from interface:ServerStopPerformer
Restart the server (async operation)- Specified by:
restart
in interfaceServerStopPerformer
- Parameters:
beforeStopAction
- will be called only if restart attempt is successful.- Throws:
ServerStopException
-
isSupported
public boolean isSupported()
- Specified by:
isSupported
in interfaceServerStopPerformer
-
getNotSupportedReason
@Nullable public String getNotSupportedReason()
Description copied from interface:ServerStopPerformer
null when restart is supported.- Specified by:
getNotSupportedReason
in interfaceServerStopPerformer
-
getStartupScriptPath
@Nullable public File getStartupScriptPath()
Description copied from interface:TeamCityServerStartupScript
Returns the path to the teamcity-server.bat/sh script if the server was started using this script, null otherwise- Specified by:
getStartupScriptPath
in interfaceTeamCityServerStartupScript
-
-