Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CommandService

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

interface

Hierarchy

  • CommandService

Index

Methods

oneway

  • Submit a oneway command to a component which returns a promise of OnewayResponse. This api is used when completion is provided through CurrentState or status values and eventService.

    Parameters

    Returns Promise<OnewayResponse>

    OnewayResponse as Promise

query

  • This api is used to get the result of a long running command which was submitted and returns a promise of SubmitResponse.

    Parameters

    • runId: string

      The runId of the command for which response is required

    Returns Promise<SubmitResponse>

    SubmitResponse as Promise

queryFinal

  • queryFinal(runId: string, timeoutInSeconds: number): Promise<SubmitResponse>
  • This api is used to get the final result of a long running command which was submitted and returns a promise of SubmitResponse.

    Parameters

    • runId: string

      The runId of the command for which response is required

    • timeoutInSeconds: number

      time to wait for a final response

    Returns Promise<SubmitResponse>

    SubmitResponse as Promise

submit

submitAllAndWait

submitAndWait

subscribeCurrentState

  • Subscribe to the current state of a component corresponding to the AkkaLocation of the component

    Parameters

    • stateNames: Set<string>

      Subscribe to the set of currentStates. If no states are provided, all the current states will be received.

    Returns (onStateChange: (state: CurrentState) => void, onError?: (error: ServiceError) => void, onClose?: () => void) => Subscription

    Subscription which can be used to cancel to the subscription in future.

      • Subscribe to the current state of a component corresponding to the AkkaLocation of the component

        Parameters

        • onStateChange: (state: CurrentState) => void

          a callback which gets called on change of any of the subscribed currentState

            • a callback which gets called on change of any of the subscribed currentState

              Parameters

              Returns void

        • Optional onError: (error: ServiceError) => void

          a optional error callback which gets called on receiving error. it can be Parsing error or a Runtime error [for ex. Gateway exception]

            • a optional error callback which gets called on receiving error. it can be Parsing error or a Runtime error [for ex. Gateway exception]

              Parameters

              Returns void

        • Optional onClose: () => void

          a optional close callback which gets called when the connection is closed.

            • (): void
            • a optional close callback which gets called when the connection is closed.

              Returns void

        Returns Subscription

        Subscription which can be used to cancel to the subscription in future.

validate

Generated using TypeDoc