Packages

t

glngn.server

ServiceActorBindings

trait ServiceActorBindings extends AnyRef

Declarative mapping from a service domain's internal protocol to implementations. Included in ServiceFragment. Implementations are typically other ServiceActors. Using these provides additional auditing features. However, glngn.server.prelude.ZIO actions and plain akka actors are supported.

Conceptually, the mapping of service domain protocol to implementations is refered to as the bindings: the binding of a domain term to an implementation. Logically similar to a one-way data binding in various UI controller libraries. The bindings are determined by evaluating Instance.bindings for each service actor instance.

The ServiceActorBindings trait enforces this by requiring the ServiceActor object to define an Instance class implementing BindingsInstance: a method bindings defining the mapping.

object BalanceSheet extends ServiceActor with ServiceActorBindings {
  sealed trait Proto extends Message

  class Instance(val env: InstanceEnv) extends BindingsInstance {
    def bindings: Bindings[_] = ???
  }
}
Self Type
ServiceActorBindings with ServiceActor
Linear Supertypes
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. ServiceActorBindings
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Bindings[A] = Free[(ServiceActorBindings.this)#BindingsOp, A]

    Type of bindings declaration.

  2. trait BindingsInstance extends prelude.Injector
  3. sealed trait BindingsOp[A] extends AnyRef
  4. type DelegateMapping = PartialFunction[(ServiceActorBindings.this)#Proto, prelude.ActorRef[(ServiceActorBindings.this)#Envelope]]

  5. type EntityMapping[Entity_Id, Entity_Request] = PartialFunction[(ServiceActorBindings.this)#Proto, (Entity_Id, Entity_Request)]

  6. abstract type Instance <: (ServiceActorBindings.this)#BindingsInstance

    This service actor object must contain a class Instance.

    This service actor object must contain a class Instance. This class must mix in, at least, BindingsInstance. Which contains the bindings expression evaluated to determine the bindings declaration.

    The requirement on an Instance assists in parameterization of service actor behavior while keeping consideration of the Protocol separate.

  7. abstract type InstanceEnv <: BindingsInstanceEnv

    Environment for instance of service actor using bindings.

    Environment for instance of service actor using bindings. This is data an Instance will always be provided.

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. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  20. object Bindings

Inherited from AnyRef

Inherited from Any

Domain

Service Logic

Implementation Detail

Ungrouped