Packages

abstract class Action extends AnyRef

Actions are stateless components that can be used to implement different uses cases, such as:

  • a pure function.
  • request conversion - you can use Actions to convert incoming data into a different format before forwarding a call to a different component.
  • publish messages to a Topic.
  • subscribe to events from an Event Sourced Entity.
  • subscribe to state changes from a Value Entity.
  • schedule and cancel Timers.

Actions can be triggered in multiple ways. For example, by:

  • a gRPC service call.
  • an HTTP service call.
  • a forwarded call from another component.
  • a scheduled call from a Timer.
  • an incoming message from a Topic.
  • an incoming event from an Event Sourced Entity, from within the same service or from a different service.
  • state changes notification from a Value Entity on the same service.

An Action method should return an kalix.scalasdk.action.Action.Effect that describes what to do next.

Source
Action.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Action
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Action()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from Action toany2stringadd[Action] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Action, B)
    Implicit
    This member is added by an implicit conversion from Action toArrowAssoc[Action] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def _internalSetActionContext(context: Option[ActionContext]): Unit

    INTERNAL API

  7. final def actionContext: ActionContext

    Additional context and metadata for a message handler.

    Additional context and metadata for a message handler.

    It will throw an exception if accessed from constructor.

    Attributes
    protected
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  10. final def contextForComponents: ActionContext

    INTERNAL API

    INTERNAL API

    Same as actionContext, but if specific error message when accessing components.

    Attributes
    protected
  11. final def effects[T]: Builder
    Attributes
    protected
  12. def ensuring(cond: (Action) => Boolean, msg: => Any): Action
    Implicit
    This member is added by an implicit conversion from Action toEnsuring[Action] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: (Action) => Boolean): Action
    Implicit
    This member is added by an implicit conversion from Action toEnsuring[Action] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: Boolean, msg: => Any): Action
    Implicit
    This member is added by an implicit conversion from Action toEnsuring[Action] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: Boolean): Action
    Implicit
    This member is added by an implicit conversion from Action toEnsuring[Action] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  18. implicit def executionContext: ExecutionContext

    An ExecutionContext to use when composing Futures inside Actions.

  19. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  26. final def timers: TimerScheduler

    Returns a kalix.scalasdk.timer.TimerScheduler that can be used to schedule further in time.

  27. def toString(): String
    Definition Classes
    AnyRef → Any
  28. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Deprecated Value Members

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

    (Since version 9)

  2. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from Action toStringFormat[Action] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  3. def [B](y: B): (Action, B)
    Implicit
    This member is added by an implicit conversion from Action toArrowAssoc[Action] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromAction to any2stringadd[Action]

Inherited by implicit conversion StringFormat fromAction to StringFormat[Action]

Inherited by implicit conversion Ensuring fromAction to Ensuring[Action]

Inherited by implicit conversion ArrowAssoc fromAction to ArrowAssoc[Action]

Ungrouped