Packages

t

csw.command.api.scaladsl

CommandService

trait CommandService extends AnyRef

A Command Service API of a csw component. This model provides method based APIs for command interactions with a component.

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

Abstract Value Members

  1. abstract def oneway(controlCommand: ControlCommand): Future[OnewayResponse]

    Send a command as a Oneway and get a csw.params.commands.CommandResponse.OnewayResponse as a Future.

    Send a command as a Oneway and get a csw.params.commands.CommandResponse.OnewayResponse as a Future. The OnewayResponse can be a response of validation (Accepted, Invalid) or Locked. The use of oneway is the highest performance command interaction. It is used when completion, if needed at all, is provided through CurrentState or status values and Event Service. See also onewayAndMatch

    controlCommand

    the csw.params.commands.ControlCommand payload

    returns

    a OnewayResponse as a Future value

  2. abstract def onewayAndMatch(controlCommand: ControlCommand, stateMatcher: StateMatcher): Future[MatchingResponse]

    Submit a command and match the published state from the component using a csw.command.api.StateMatcher.

    Submit a command and match the published state from the component using a csw.command.api.StateMatcher. If the match is successful a Completed response is provided as a future. In case of a failure or unmatched state, Error CommandResponse is provided as a Future.

    controlCommand

    the csw.params.commands.ControlCommand payload

    stateMatcher

    the StateMatcher implementation for matching received state against a demand state

    returns

    a MatchingResponse as a Future value

  3. abstract def query(commandRunId: Id): Future[SubmitResponse]

    Query for the result of a long running command which was sent as Submit to get a csw.params.commands.CommandResponse.SubmitResponse as a Future.

    Query for the result of a long running command which was sent as Submit to get a csw.params.commands.CommandResponse.SubmitResponse as a Future. Query allows checking to see if a long-running command is completed without waiting as with queryFinal.

    commandRunId

    the runId of the command for which response is required

    returns

    a SubmitResponse as a Future value

  4. abstract def queryFinal(commandRunId: Id)(implicit timeout: Timeout): Future[SubmitResponse]

    Query for the final result of a long running command which was sent as Submit to get a csw.params.commands.CommandResponse.SubmitResponse as a Future

    Query for the final result of a long running command which was sent as Submit to get a csw.params.commands.CommandResponse.SubmitResponse as a Future

    commandRunId

    the runId of the command for which response is required

    timeout

    max-time to wait for a final response

    returns

    a SubmitResponse as a Future value

  5. abstract def submit(controlCommand: ControlCommand): Future[SubmitResponse]

    Submit given command and returns csw.params.commands.CommandResponse.SubmitResponse as a Future

    Submit given command and returns csw.params.commands.CommandResponse.SubmitResponse as a Future

    controlCommand

    the csw.params.commands.ControlCommand payload

    returns

    a SubmitResponse as a Future value

  6. abstract def submitAllAndWait(submitCommands: List[ControlCommand])(implicit timeout: Timeout): Future[List[SubmitResponse]]

    Submit multiple commands and get a List of csw.params.commands.CommandResponse.SubmitResponse for all commands.

    Submit multiple commands and get a List of csw.params.commands.CommandResponse.SubmitResponse for all commands. The CommandResponse can be a response of validation (Accepted, Invalid) or a final Response. In case of response as Accepted, final CommandResponse can be obtained by using subscribe API.

    submitCommands

    the set of csw.params.commands.ControlCommand payloads

    timeout

    max-time to wait for a final response

    returns

    a future list of SubmitResponse, one for each command

  7. abstract def submitAndWait(controlCommand: ControlCommand)(implicit timeout: Timeout): Future[SubmitResponse]

    Submit a command and Subscribe for the result if it was successfully validated as Started to get a final csw.params.commands.CommandResponse.SubmitResponse as a Future

    Submit a command and Subscribe for the result if it was successfully validated as Started to get a final csw.params.commands.CommandResponse.SubmitResponse as a Future

    controlCommand

    the csw.params.commands.ControlCommand payload

    timeout

    max-time to wait for a final response

    returns

    a SubmitResponse as a Future value

  8. abstract def subscribeCurrentState(names: Set[StateName], callback: (CurrentState) => Unit): Subscription

    Subscribe to the current state of a component corresponding to the csw.location.api.models.AkkaLocation of the component

    Subscribe to the current state of a component corresponding to the csw.location.api.models.AkkaLocation of the component

    names

    subscribe to only those states which have any of the provided value for name

    callback

    the action to be applied on the CurrentState element received as a result of subscription

    returns

    a Subscription to stop the subscription

    Note

    Callbacks are not thread-safe on the JVM. If you are doing side effects/mutations inside the callback, you should ensure that it is done in a thread-safe way inside an actor.

  9. abstract def subscribeCurrentState(callback: (CurrentState) => Unit): Subscription

    Subscribe to the current state of a component corresponding to the csw.location.api.models.AkkaLocation of the component

    Subscribe to the current state of a component corresponding to the csw.location.api.models.AkkaLocation of the component

    callback

    the action to be applied on the CurrentState element received as a result of subscription

    returns

    a Subscription to stop the subscription

    Note

    Callbacks are not thread-safe on the JVM. If you are doing side effects/mutations inside the callback, you should ensure that it is done in a thread-safe way inside an actor.

  10. abstract def subscribeCurrentState(names: Set[StateName] = Set.empty): Source[CurrentState, Subscription]

    Subscribe to the current state of a component corresponding to the csw.location.api.models.AkkaLocation of the component

    Subscribe to the current state of a component corresponding to the csw.location.api.models.AkkaLocation of the component

    names

    subscribe to states which have any of the provided value for name. If no states are provided, all the current states will be received.

    returns

    a stream of current states with CurrentStateSubscription as the materialized value which can be used to stop the subscription

  11. abstract def validate(controlCommand: ControlCommand): Future[ValidateResponse]

    Send a Validate command and get ValidateResponse as a Future.

    Send a Validate command and get ValidateResponse as a Future. The ValidateResponse can be of type Accepted, Invalid or Locked.

    controlCommand

    the csw.params.commands.ControlCommand payload

    returns

    a ValidateResponse as a Future value

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped