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
- Alphabetic
- By Inheritance
- Action
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Action()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (Action, B)
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def _internalSetActionContext(context: Option[ActionContext]): Unit
INTERNAL API
- 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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def contextForComponents: ActionContext
INTERNAL API
INTERNAL API
Same as actionContext, but if specific error message when accessing components.
- Attributes
- protected
- final def effects[T]: Builder
- Attributes
- protected
- def ensuring(cond: (Action) => Boolean, msg: => Any): Action
- def ensuring(cond: (Action) => Boolean): Action
- def ensuring(cond: Boolean, msg: => Any): Action
- def ensuring(cond: Boolean): Action
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- implicit def executionContext: ExecutionContext
An ExecutionContext to use when composing Futures inside Actions.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def timers: TimerScheduler
Returns a kalix.scalasdk.timer.TimerScheduler that can be used to schedule further in time.
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)
- 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 ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.
- 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.