Class 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 of CommandResponse.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 a CommandResponse.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 final CommandResponse.SubmitResponse In this case, Assembly can register its interest in the final CommandResponse 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 final CommandResponse

    • Constructor Detail

      • CommandResponseManagerActor

        public CommandResponseManagerActor()
    • Method Detail

      • behavior

        public 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 Logger instance
        Returns:
        behavior for CommandResponseManagerActor