Interface: UnaryCommandContext

akkaserverless.Action. UnaryCommandContext

Context for a unary action command.

Extends

Members


metadata :module:akkaserverless.Metadata

Type:
Inherited From:

Methods


effect(method, message [, synchronous] [, metadata] [, internalCall])

DEPRECATED. Emit an effect after processing this command.

Parameters:
Name Type Argument Description
method any

The entity service method to invoke.

message object

The message to send to that service.

synchronous boolean <optional>

Whether the effect should be execute synchronously or not.

metadata module:akkaserverless.Metadata <optional>

Metadata to send with the effect.

internalCall boolean <optional>

For internal calls to this deprecated function.

Inherited From:

fail(msg)

Fail handling this command.

An alternative to using this is to return a failed Reply created with 'ReplyFactory.failed'.

Parameters:
Name Type Description
msg string

The failure message.

Inherited From:
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.


forward(method, message, metadata)

DEPRECATED. Forward this command to another service component call, use 'ReplyFactory.forward' instead.

Parameters:
Name Type Description
method

The service component method to invoke.

message object

The message to send to that service component.

metadata module:akkaserverless.Metadata

Metadata to send with the forward.

Overrides:

on(eventType, callback)

Register an event handler.

Parameters:
Name Type Description
eventType string

The type of the event.

callback function

The callback to handle the event.

Inherited From:

thenForward(method, message, metadata)

DEPRECATED. Forward this command to another service component call.

Parameters:
Name Type Description
method any

The service component method to invoke.

message object

The message to send to that service component.

metadata module:akkaserverless.Metadata

Metadata to send with the forward.

Inherited From:
Deprecated:
  • Since version 0.7. Will be deleted in version 0.8. Use 'forward' instead.

write(message [, metadata])

Write a message.

Parameters:
Name Type Argument Description
message Object

The protobuf message to write.

metadata module:akkaserverless.Metadata <optional>

The metadata associated with the message.

Inherited From: