Package csw.command.client
Class CommandResponseManager
- java.lang.Object
-
- csw.command.client.CommandResponseManager
-
public class CommandResponseManager extends java.lang.Object
Wrapper API for interacting with Command Response Manager of a componentparam: commandResponseManagerActor underlying actor managing command responses for started commands param: actorSystem actor system for allowing sending messages in API
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CommandResponseManager.OverallFailure
Indicates that at least one of the responses ended with a negative response param: responses the set of responsesstatic class
CommandResponseManager.OverallFailure$
static interface
CommandResponseManager.OverallResponse
static class
CommandResponseManager.OverallSuccess
Indicates that all responses included completed successfully.static class
CommandResponseManager.OverallSuccess$
-
Constructor Summary
Constructors Constructor Description CommandResponseManager(akka.actor.typed.ActorRef<MiniCRM.CRMMessage> commandResponseManagerActor, akka.actor.typed.ActorSystem<?> actorSystem)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description akka.actor.typed.ActorSystem<?>
actorSystem()
akka.actor.typed.ActorRef<MiniCRM.CRMMessage>
commandResponseManagerActor()
scala.concurrent.ExecutionContext
ex()
java.util.concurrent.CompletableFuture<CommandResponseManager.OverallResponse>
queryFinalAll(java.util.List<java.util.concurrent.CompletableFuture<CommandResponse.SubmitResponse>> commands)
Java API: queryFinal allows executing code when all the provided commands have completed.scala.concurrent.Future<CommandResponseManager.OverallResponse>
queryFinalAll(scala.collection.immutable.Seq<scala.concurrent.Future<CommandResponse.SubmitResponse>> commands)
queryFinal allows executing code when all the provided commands have completed.void
updateCommand(CommandResponse.SubmitResponse submitResponse)
Add a new command or update an existing command with the provided status
-
-
-
Constructor Detail
-
CommandResponseManager
public CommandResponseManager(akka.actor.typed.ActorRef<MiniCRM.CRMMessage> commandResponseManagerActor, akka.actor.typed.ActorSystem<?> actorSystem)
-
-
Method Detail
-
commandResponseManagerActor
public akka.actor.typed.ActorRef<MiniCRM.CRMMessage> commandResponseManagerActor()
-
actorSystem
public akka.actor.typed.ActorSystem<?> actorSystem()
-
updateCommand
public void updateCommand(CommandResponse.SubmitResponse submitResponse)
Add a new command or update an existing command with the provided status- Parameters:
submitResponse
- final update for a started commandCommandResponse.SubmitResponse
-
ex
public scala.concurrent.ExecutionContext ex()
-
queryFinalAll
public scala.concurrent.Future<CommandResponseManager.OverallResponse> queryFinalAll(scala.collection.immutable.Seq<scala.concurrent.Future<CommandResponse.SubmitResponse>> commands)
queryFinal allows executing code when all the provided commands have completed.- Parameters:
commands
- commands that have been started with submit or submitAndWait- Returns:
- An overall response indicated success or failure
-
queryFinalAll
public java.util.concurrent.CompletableFuture<CommandResponseManager.OverallResponse> queryFinalAll(java.util.List<java.util.concurrent.CompletableFuture<CommandResponse.SubmitResponse>> commands)
Java API: queryFinal allows executing code when all the provided commands have completed.- Parameters:
commands
- commands that have been started with submit or submitAndWait- Returns:
- An overall response indicated success or failure
-
-