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 StringgetNotSupportedReason()null when restart is supported.FilegetStartupScriptPath()Returns the path to the teamcity-server.bat/sh script if the server was started using this script, null otherwisebooleanisSupported()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:ServerStopPerformerStop the server (async operation)- Specified by:
stopin 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:ServerStopPerformerRestart the server (async operation)- Specified by:
restartin interfaceServerStopPerformer- Parameters:
beforeStopAction- will be called only if restart attempt is successful.- Throws:
ServerStopException
-
isSupported
public boolean isSupported()
- Specified by:
isSupportedin interfaceServerStopPerformer
-
getNotSupportedReason
@Nullable public String getNotSupportedReason()
Description copied from interface:ServerStopPerformernull when restart is supported.- Specified by:
getNotSupportedReasonin interfaceServerStopPerformer
-
getStartupScriptPath
@Nullable public File getStartupScriptPath()
Description copied from interface:TeamCityServerStartupScriptReturns the path to the teamcity-server.bat/sh script if the server was started using this script, null otherwise- Specified by:
getStartupScriptPathin interfaceTeamCityServerStartupScript
-
-