Class CommandService
- java.lang.Object
-
- com.microsoft.jenkins.azurecommons.command.CommandService
-
public final class CommandService extends Object
State machine for command execution.NB. Not fully type safe on generic types.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCommandService.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CommandService.Builderbuilder()voidexecuteCommands(ICommandServiceData commandServiceData)Executes the commands described by the givencommandServiceData, and runs the clean up command if present.ICommand<IBaseCommandData>getCleanUpCommand()com.google.common.collect.ImmutableSet<Class>getRegisteredCommands()ClassgetStartCommandClass()com.google.common.collect.ImmutableMap<Class,Class>getTransitions()
-
-
-
Method Detail
-
builder
public static CommandService.Builder builder()
-
getCleanUpCommand
public ICommand<IBaseCommandData> getCleanUpCommand()
-
getStartCommandClass
public Class getStartCommandClass()
-
getRegisteredCommands
public com.google.common.collect.ImmutableSet<Class> getRegisteredCommands()
-
executeCommands
public void executeCommands(ICommandServiceData commandServiceData)
Executes the commands described by the givencommandServiceData, and runs the clean up command if present.- Parameters:
commandServiceData- the service data that describes the commands state transitions.
-
-