Class CommandResponseManagerActor
- java.lang.Object
- 
- csw.command.client.CommandResponseManagerActor
 
- 
 public class CommandResponseManagerActor extends java.lang.ObjectThe Behavior of a Command Response Manager is represented as a mutable behavior. This behavior will be created as an actor. There will be one CommandResponseManager for a given component which will provide an interface to interact with the status and result of a submitted commands.This class defines the behavior of CommandResponseManagerActor and is responsible for adding/updating/querying command result. When component receives command of type Submit, then framework (ComponentBehavior - TLA) will add a entry of this command with the CommandResponse.SubmitResponseofCommandResponse.Startedstored into the CommandResponseManager.In case of short running or immediate command, submit response will be of type final result which can either positive or negative In case of long running command, a positive validation will result of type CommandResponse.Startedthen it is the responsibility of component writer to update the runId of the command with its final command status later on with aCommandResponse.SubmitResponsewhich will either be a positive or negative response.CommandResponseManager also provides subscribe API. One of the use cases for this is when Assembly splits a top level command into two sub commands and forwards them to two different HCD's. In this case, Assembly can register its interest in the final CommandResponse.SubmitResponsefrom two HCD's when these sub commands completes, using subscribe API. And once Assembly receives final submit response from both the HCD's then it can update Top level command with finalCommandResponse.SubmitResponseIn this case, Assembly can register its interest in the finalCommandResponsefrom two HCD's when these sub commands completes, using subscribe API. And once Assembly receives final command response from both the HCD's then it can update Top level command with finalCommandResponse
- 
- 
Constructor SummaryConstructors Constructor Description CommandResponseManagerActor()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static akka.actor.typed.Behavior<CommandResponseManagerMessage>behavior(CRMCacheProperties crmCacheProperties, csw.logging.client.scaladsl.LoggerFactory loggerFactory)
 
- 
- 
- 
Method Detail- 
behaviorpublic static akka.actor.typed.Behavior<CommandResponseManagerMessage> behavior(CRMCacheProperties crmCacheProperties, csw.logging.client.scaladsl.LoggerFactory loggerFactory) - Parameters:
- crmCacheProperties- Cache properties for CommandResponseState, for eg. expiry-time
- loggerFactory- The factory for creating- Loggerinstance
- Returns:
- behavior for CommandResponseManagerActor
 
 
- 
 
-