Options
All
  • Public
  • Public/Protected
  • All
Menu

Context for a Replicated Entity command handler.

Type Parameters

Hierarchy

Index

Properties

entityId: string

The id of the entity that the command is for.

commandId: Long

The id of the command.

replyMetadata: Metadata

The metadata to send with a reply.

metadata: Metadata

The metadata associated with the command.

state: State

The Replicated Data state for a Replicated Entity.

remarks

It may only be set once, if it's already set, an error will be thrown.

Methods

  • DEPRECATED. Emit an effect after processing this command.

    deprecated

    Use Reply.addEffect instead.

    Parameters

    • method: EffectMethod

      The entity service method to invoke

    • message: Message

      The message to send to that service

    • Optional synchronous: boolean

      Whether the effect should be execute synchronously or not

    • Optional metadata: Metadata

      Metadata to send with the effect

    • Optional internalCall: boolean

      For internal calls to this deprecated function

    Returns void

  • Fail handling this command.

    remarks

    An alternative to using this is to return a failed Reply created with replies.failure.

    throws

    An error that captures the failure message. Note that even if you catch the error thrown by this method, the command will still be failed with the given message.

    Parameters

    • msg: string

      The failure message

    • Optional grpcStatus: GrpcStatus

      The grpcStatus

    Returns void

  • DEPRECATED. Forward this command to another service component call.

    deprecated

    Use replies.forward instead.

    Parameters

    • method: EffectMethod

      The service component method to invoke

    • message: Message

      The message to send to that service component

    • Optional metadata: Metadata

      Metadata to send with the forward

    Returns void

  • DEPRECATED. Forward this command to another service component call.

    deprecated

    Use replies.forward instead.

    Parameters

    • method: EffectMethod

      The service component method to invoke

    • message: Message

      The message to send to that service component

    • Optional metadata: Metadata

      Metadata to send with the forward

    • Optional internalCall: boolean

      For internal calls to this deprecated function

    Returns void

  • delete(): void

Generated using TypeDoc