object Bindings
Methods to bind this service's protocol to implementations.
If a binding is not provided for a protocol message the message is considered unhandled. Any endpoint for the protocol message will reply with HTTP 501 Not Implemented.
// a hypothetical service for account balances final object AServiceFragment extends ServiceFragment { override def instantiate(env: InstanceEnv) = new Instance(env) { // the service event consumer is implemented using... val bindings = bindingsChain( // operations on a named entity entity(AnEntity) { case ServiceOperationOnEntity(entityId) => AnEntity.AnOperation -> accountId }, // a daemon sending Proto messages back to this service async(OrdersOverSMSBehavior) // where OrdersOverSMSBehavior being a [[ServiceActorDaemon]] ) } }
- Grouped
- Alphabetic
- By Inheritance
- Bindings
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
final
type
FunctionHandler = PartialFunction[ServiceBindings.Envelope, _]
see handler
-
final
type
FunctionResponder[R] = PartialFunction[ServiceBindings.AnyRequest, R]
see responder
-
final
type
HandlerIO = PartialFunction[ServiceBindings.Envelope, AppTask[Unit]]
see handlerIO
-
final
type
ResponderIO[R] = PartialFunction[ServiceBindings.AnyRequest, AppTask[R]]
see responderIO
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
async(serviceDaemon: ServiceDaemon[ServiceBindings.Envelope]): Bindings[_]
Starts the given ServiceDaemon that will be provided a reference to this service actor.
Starts the given ServiceDaemon that will be provided a reference to this service actor. The daemon operates using it's own protocol . The behavior is provided a reference to this service actor.
Alias of
daemon
. -
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
daemon(serviceDaemon: ServiceDaemon[ServiceBindings.Envelope]): Bindings[_]
Starts the given ServiceDaemon that will be provided a reference to this service actor.
Starts the given ServiceDaemon that will be provided a reference to this service actor. The daemon operates using it's own protocol . The behavior is provided a reference to this service actor.
-
def
delegate(behavior: prelude.external.Behavior[ServiceBindings.Envelope]): Bindings[_]
All protocol messages (in an envelope) that have not thus matched a binding will be provided to the behavior.
All protocol messages (in an envelope) that have not thus matched a binding will be provided to the behavior. Logically similar to delegating to an actor with a behavior on envelopes.
-
val
empty: Bindings[Unit]
Empty bindings; All protocol events are unhandled.
-
def
entity[E <: ServiceEntity](entityType: E, logicalDomain: String)(pf: PartialFunction[ServiceBindings.Proto, Bindings.entity.E.RequestWithId]): Bindings[_]
Delegates the match protocol message to persistent entities defined by a given ServiceEntity.
Delegates the match protocol message to persistent entities defined by a given ServiceEntity.
The delegation is defined by a partial function from the domain protocol to an entity identifier and entity protocol.
-
def
entity[E <: ServiceEntity](entityType: E)(pf: PartialFunction[ServiceBindings.Proto, Bindings.entity.E.RequestWithId]): Bindings[_]
Delegates the match protocol message to persistent entities defined by a given ServiceEntity.
Delegates the match protocol message to persistent entities defined by a given ServiceEntity.
The delegation is defined by a partial function from the domain protocol to an entity identifier and entity protocol.
-
def
entity[E <: ServiceEntity](entityType: E, logicalDomain: Option[String])(pf: PartialFunction[ServiceBindings.Proto, Bindings.entity.E.RequestWithId]): Bindings[_]
Delegates the match protocol message to persistent entities defined by a given ServiceEntity.
Delegates the match protocol message to persistent entities defined by a given ServiceEntity.
The delegation is defined by a partial function from the domain protocol to an entity identifier and entity protocol.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
handler(f: FunctionHandler): Bindings[_]
Invoke an function on matched ServiceActor.Envelope.
Invoke an function on matched ServiceActor.Envelope.
val addToDatabaseImpure: Response = ??? val exampleBinding = handler { case Request(scope, ACommand(value)) => { val response = addToDatabaseImpure(value) scope.provide(databaseResponse) } }
-
def
handlerIO(p: HandlerIO): Bindings[_]
Execute the given AppTask action for matched protocol messages.
Execute the given AppTask action for matched protocol messages.
The action is provided the request scope and is expected to provide a response within the timeout required by the endpoint.
val addToDatabaseIO: IO[Response] = ??? val exampleBinding = handlerIO { case Request(scope, ACommand(value)) => addToDatabaseIO(value) flatMap { databaseResponse => scope.provide(databaseResponse) } }
-
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()
-
def
responder[R](f: FunctionResponder[R])(implicit arg0: Manifest[R]): Bindings[_]
Invoke an function on matched ServiceActor.Envelope.
Invoke an function on matched ServiceActor.Envelope.
val addToDatabaseImpure: Response = ??? val exampleBinding = responder { case ACommand(value) => addToDatabaseImpure(value) }
-
def
responderIO[R](p: ResponderIO[R])(implicit arg0: Manifest[R]): Bindings[_]
Execute the given AppTask action for matched protocol messages.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
glngn server is a low-code business process as a service rapid development system. Conceptually similar to a programmable Microsoft Access or Apple FileMaker for scalable event sourced business services. In addition to a library, a standalone application is provided that is useful with minimal ceremony. This can be customized with a simple API. As well as deployed to a kubernetes cluster should those advantages be required.
A deployment is cluster of glngn.server.node.AppNodes serving a dynamic composition of glngn.server.ServiceFragments. Deployments are designed to be fully usable as a standalone local application or a kubernetes service.
Contact support@dogheadbone.com for support and licensing.