Packages

t

glngn.server

ServiceActor

trait ServiceActor extends AnyRef

ServiceActor is an actor representing a service within the goal engine system. Conceptually the API can be thought of as a simplified actor API compared to the full akka API. This API is designed to trade constraints for automation.

The ServiceFragment class is the typical base class for a domain specific addition.

To declare a new service actor, define a scala object that inherits from this trait with a sealed protocol Proto. EG:

import glngn._
import glngn.prelude._

object SuitTailoringOrders extends ServiceActor {
  sealed trait Proto extends Message
}

Technical Deep Dive - This usage pattern contains two choices for constraints. 1. service actor will be defined in an object. 2. a sealed trait for Proto.

goals:

  • Explicit annotations for command and query requests.
  • actor interface required by ActorService.
  • bridge between ActorService and unconstrained Akka
  • low/zero cost lifting of general akka behaviors / protocols
Linear Supertypes
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. ServiceActor
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait Attributes extends AnyRef

  2. abstract class Command[Response] extends Request[Response] with proto.ProtoDecl.Command with proto.ProtoDecl.Request

    Abstract class of all Commands.

    Abstract class of all Commands. All commands are requests.

  3. trait CompleteWithCommandMagnet extends CompleteWithRequestMagnet

  4. trait CompleteWithQueryMagnet extends CompleteWithRequestMagnet

  5. trait CompleteWithRequestMagnet extends DelegateResponseMagnet

  6. sealed trait Envelope extends Message

    A Proto statement with inferred attributes and claims.

  7. abstract type Proto <: Message

    The commands, queries and events all implement Proto.

    The commands, queries and events all implement Proto. Easy inferrence of operations schema and endpoint schema assumes the use of a sealed trait.

    Example:
    1. a typical definition

      sealed trait Proto extends Message
  8. abstract class Query[Response] extends Request[Response] with proto.ProtoDecl.Query with proto.ProtoDecl.Request

    Abstract class of all Queries.

    Abstract class of all Queries. All queries are requests.

  9. sealed abstract class Request[R] extends AnyRef

    A Request must be sealed to use.

    A Request must be sealed to use. This is necessary to finalize additional attributes; Such as requester.

    TODO: #106 extends on the attributes included in sealed.

  10. sealed trait RequestAttrs[Response] extends AnyRef

    Request attributes evidenced by a set of attributes.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. lazy val logger: prelude.Logger

    Attributes
    protected
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  17. def toString(): String
    Definition Classes
    AnyRef → Any
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  21. object CompleteWithCommandMagnet

  22. object CompleteWithQueryMagnet

  23. object Effect

    Forwards akka.persistence.typed.scaladsl.Effect with additional type constraints.

  24. object Envelope

  25. object Event

    Any statement in the protocol can be considered an Event not associated with any additional attributes (eg: requester).

  26. object PersistentEntity

    Re-export of akka.cluster.sharding.typed.scaladsl.EventSourcedEntity with types constrained to this service actor's protocol.

  27. object Request

  28. object StartPassivateEnvelope extends Envelope with Product with Serializable

  29. object StopEnvelope extends Envelope with Product with Serializable

Inherited from AnyRef

Inherited from Any

Domain

Service Logic

Implementation Detail

Ungrouped