Packages

  • package root
    Definition Classes
    root
  • package csw
    Definition Classes
    root
  • package command
    Definition Classes
    csw
  • package api
    Definition Classes
    command
  • package client

    This project defines the basic classes and traits for the Command Service.

    Command Service

    This project defines the basic classes and traits for the Command Service.

    Related projects are: - csw-messages:

    • This defines the types of command (Oneway/Submit etc.) and types of configurations (Setup/Observe/Wait etc.)
    • Complete usage of Messages is available at: https://tmtsoftware.github.io/csw/services/messages.html

    - framework:

    • This defines the Hcd and Assembly handlers, lifecycle manager and supervisor for components.
    • Framework allows component writer to override onValidation, onSubmit and onOneway handlers. (Note it allows overriding other handlers as well.)
    • On every command received by component, onValidation handler gets invoked where received command gets validated and validation response is returned.
    • Based on validation response and command type, onSubmit/onOneway hooks gets invoked where command gets processed.
    • Complete details of handling commands can be found here : https://tmtsoftware.github.io/csw/framework/handling-lifecycle.html#handling-commands

    Important classes in this project are:

    - csw.command.api.scaladsl.CommandService

    This class wraps the csw.location.api.models.AkkaLocation and provides helpers to send commands to component actor extracted from provided location. Normal component writers workflow would be to first resolve component using location service and then create CommandService instance using resolved location.

    Using this instance, you can Submit Command/Commands to other component or query for command result or subscribe for long running command result.

    When you have multiple commands targeted to multiple components then you can use ConfigDistributor. Using CommandDistributor utility you can send all these commands in one go and get aggregated response.

    Complete guide of usage of different API's provided by CommandService is available at: https://tmtsoftware.github.io/csw/command.html

    Definition Classes
    command
  • package auth
  • package cbor
  • package extensions
  • package handlers
  • package messages
  • package models
  • CommandResponseManager
  • CommandServiceFactory
  • MiniCRM
  • SequencerCommandServiceImpl

package client

Command Service

This project defines the basic classes and traits for the Command Service.

Related projects are: - csw-messages:

  • This defines the types of command (Oneway/Submit etc.) and types of configurations (Setup/Observe/Wait etc.)
  • Complete usage of Messages is available at: https://tmtsoftware.github.io/csw/services/messages.html

- framework:

  • This defines the Hcd and Assembly handlers, lifecycle manager and supervisor for components.
  • Framework allows component writer to override onValidation, onSubmit and onOneway handlers. (Note it allows overriding other handlers as well.)
  • On every command received by component, onValidation handler gets invoked where received command gets validated and validation response is returned.
  • Based on validation response and command type, onSubmit/onOneway hooks gets invoked where command gets processed.
  • Complete details of handling commands can be found here : https://tmtsoftware.github.io/csw/framework/handling-lifecycle.html#handling-commands

Important classes in this project are:

- csw.command.api.scaladsl.CommandService

This class wraps the csw.location.api.models.AkkaLocation and provides helpers to send commands to component actor extracted from provided location. Normal component writers workflow would be to first resolve component using location service and then create CommandService instance using resolved location.

Using this instance, you can Submit Command/Commands to other component or query for command result or subscribe for long running command result.

When you have multiple commands targeted to multiple components then you can use ConfigDistributor. Using CommandDistributor utility you can send all these commands in one go and get aggregated response.

Complete guide of usage of different API's provided by CommandService is available at: https://tmtsoftware.github.io/csw/command.html

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. client
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package auth
  2. package cbor
  3. package extensions
  4. package handlers
  5. package messages
  6. package models

Type Members

  1. class CommandResponseManager extends AnyRef

    Wrapper API for interacting with Command Response Manager of a component

  2. class SequencerCommandServiceImpl extends SequencerCommandService

    Create a SequencerCommandService for sending commands to sequencer

Value Members

  1. object CommandResponseManager
  2. object CommandServiceFactory
  3. object MiniCRM

    miniCRM is described here.

    miniCRM is described here. miniCRM is designed to be a limited commandResponseManager, which encapsulates commands sent to one Assembly or HCD. A miniCRM supports the two CommandService methods called query and queryFinal. It keeps three list types: StartedList, ResponseList, and WaiterList StartedList: This is a list of commands that have returned Started by the handlers. They are still executing, having returned Started ResponseList: This is a list of SubmitResponses published by the component. This is called by the handlers when they publish the final SubmitResponse for a started command WaiterList: This is a list of queryFinal callers. The list contains tuples of (id, ActorRef[SubmitResponse]). Each entry is an actor waiting for the final response for the command with the given id.

    miniCRM is written in the "immutable" style so all state is passed between calls to new Behaviors

    The ComponentBehavior only submits Started commands to the miniCRM when a Started is returned from a submit handler. When a Started SubmitResponse is received, miniCRM receives an AddStarted call from ComponentBehavior. Whenever the component publishes the final completion message, it calls AddResponse, which triggers calls to any waiters associated with the runId.

    Query and QueryFinal are used by the CommandService to provide the status of a command. Both of these methods look within the three lists above for their responses. Note that miniCRM does not handle any other commands besides ones that return Started.

Inherited from AnyRef

Inherited from Any

Ungrouped