Options
All
  • Public
  • Public/Protected
  • All
Menu

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

  • 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

  • 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(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

  • 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

        • 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]

        • Optional onClose: () => void

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

            • (): void
            • Returns void

        Returns Subscription

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

Generated using TypeDoc