Class CommandResponseManagerActor$
- java.lang.Object
-
- csw.command.client.CommandResponseManagerActor$
-
public class CommandResponseManagerActor$ extends java.lang.Object
The 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.SubmitResponse
ofCommandResponse.Started
stored 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.Started
then it is the responsibility of component writer to update the runId of the command with its final command status later on with aCommandResponse.SubmitResponse
which 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.SubmitResponse
from 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.SubmitResponse
In this case, Assembly can register its interest in the finalCommandResponse
from 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
-
-
Field Summary
Fields Modifier and Type Field Description static CommandResponseManagerActor$
MODULE$
Static reference to the singleton instance of this Scala object.
-
Constructor Summary
Constructors Constructor Description CommandResponseManagerActor$()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description akka.actor.typed.Behavior<CommandResponseManagerMessage>
behavior(CRMCacheProperties crmCacheProperties, csw.logging.client.scaladsl.LoggerFactory loggerFactory)
-
-
-
Field Detail
-
MODULE$
public static final CommandResponseManagerActor$ MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Method Detail
-
behavior
public akka.actor.typed.Behavior<CommandResponseManagerMessage> behavior(CRMCacheProperties crmCacheProperties, csw.logging.client.scaladsl.LoggerFactory loggerFactory)
- Parameters:
crmCacheProperties
- Cache properties for CommandResponseState, for eg. expiry-timeloggerFactory
- The factory for creatingLogger
instance- Returns:
- behavior for CommandResponseManagerActor
-
-