Package csw.command.client
Class CommandResponseManager
java.lang.Object
csw.command.client.CommandResponseManager
Wrapper API for interacting with Command Response Manager of a component
param: commandResponseManagerActor underlying actor managing command responses for started commands param: actorSystem actor system for allowing sending messages in API
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Indicates that at least one of the responses ended with a negative response param: responses the set of responsesstatic class
static interface
static class
Indicates that all responses included completed successfully.static class
-
Constructor Summary
ConstructorDescriptionCommandResponseManager
(akka.actor.typed.ActorRef<MiniCRM.CRMMessage> commandResponseManagerActor, akka.actor.typed.ActorSystem<?> actorSystem) -
Method Summary
Modifier and TypeMethodDescriptionakka.actor.typed.ActorSystem<?>
akka.actor.typed.ActorRef<MiniCRM.CRMMessage>
scala.concurrent.ExecutionContext
ex()
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 Details
-
CommandResponseManager
public CommandResponseManager(akka.actor.typed.ActorRef<MiniCRM.CRMMessage> commandResponseManagerActor, akka.actor.typed.ActorSystem<?> actorSystem)
-
-
Method Details
-
commandResponseManagerActor
-
actorSystem
public akka.actor.typed.ActorSystem<?> actorSystem() -
updateCommand
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 CompletableFuture<CommandResponseManager.OverallResponse> queryFinalAll(List<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
-