mirror of
https://github.com/ubf/ubf.git
synced 2026-04-16 01:35:14 +00:00
4.8 KiB
4.8 KiB
Module contract_manager
Contract manager server
This module implements the contract manager server process, which
runs on the Erlang server side, between the UBF driver (or the
driver for whatever protocol is being used "over the wire",
e.g. JSON-RPC) and the plugin handler server.
image:ubf-flow-01.png[UBF Flow]
== Message Passing
In the diagram below, the "Client" is actually the UBF driver
(using UBF, EBF, JSON, JSON-RPC, or other transport protocol) that
acts on behalf of the remote client. The "Server" is actually the
plugin handler server, which acts as an intermediary between the
actual server application.
------
Client Contract Server
| | |
| | |
| | |
| {Driver,{rpc,Q}} | |
+---------->----------------+ {Contract,Q} |
| +------------->------------+
| | |
| | |
| | {reply,R,S1} |
| +-------------<------------+
| {Contract,{reply,R,S1}} | |
+----------<----------------+ |
| | |
............................................................
| | |
| | {event_out,M} |
| +-------------<------------+
| {Contract,{event_out,M}} | |
+----------<----------------+ |
| | |
............................................................
| | |
| {Contract,{event_in,M}} | |
+---------->----------------+ |
| | {event_in,M} |
| +------------->------------+
| | |
------
.
Function Index
| do_eventIn/4 | |
| do_eventOut/4 | |
| do_lpcIn/4 | |
| do_lpcOut/9 | |
| do_lpcOutError/6 | |
| do_rpcIn/4 | |
| do_rpcOut/9 | |
| do_rpcOutError/5 | |
| do_rpcOutError/6 | |
| start/1 | |
| start/3 |
Function Details
do_eventIn/4
do_eventIn(Msg, State, Mod, TLogMod) -> any()
do_eventOut/4
do_eventOut(Msg, State, Mod, TLogMod) -> any()
do_lpcIn/4
do_lpcIn(Q, State, Mod, TLogMod) -> any()
do_lpcOut/9
do_lpcOut(Ref, Q, State, Mod, Reply, ReplyState, NewState, NewMod, TLogMod) -> any()
do_lpcOutError/6
do_lpcOutError(Ref, Q, State, Mod, Error, TLogMod) -> any()
do_rpcIn/4
do_rpcIn(Q, State, Mod, TLogMod) -> any()
do_rpcOut/9
do_rpcOut(Ref, Q, State, Mod, Reply, ReplyState, NewState, NewMod, TLogMod) -> any()
do_rpcOutError/5
do_rpcOutError(Q, State, Mod, Error, TLogMod) -> any()
do_rpcOutError/6
do_rpcOutError(Ref, Q, State, Mod, Error, TLogMod) -> any()
start/1
start(SpawnOpts::list()) -> pid()
start/3
start(SimpleRPC::boolean(), VerboseRPC::boolean(), SpawnOpts::list()) -> pid()