pub struct RpcDispatcher { /* private fields */ }Expand description
Dispatches business-interface operations as DDS-RPC calls.
One instance per daemon, built from every config-named interfaces:
IDL file, sharing one dedicated client DomainParticipant
(daemon::server creates it on the daemon’s configured domain).
Implementations§
Source§impl RpcDispatcher
impl RpcDispatcher
Sourcepub fn new(
ast: Arc<Ast>,
participant: DomainParticipant,
) -> Result<Self, RpcDispatchError>
pub fn new( ast: Arc<Ast>, participant: DomainParticipant, ) -> Result<Self, RpcDispatchError>
Parses every interface out of ast (already the union of every
config-named interfaces: file — daemon::server builds it the
same way it builds the WSDL).
§Errors
RpcDispatchError::Model on a malformed interface.
Sourcepub fn knows_operation(&self, op_name: &str) -> bool
pub fn knows_operation(&self, op_name: &str) -> bool
true if op_name names an operation of a configured
interface — soap_service uses this to decide whether a
non-builtin operation name is an RPC call or genuinely unknown.
Sourcepub fn dispatch(
&self,
op_name: &str,
request_body_xml: &str,
) -> Result<String, RpcDispatchError>
pub fn dispatch( &self, op_name: &str, request_body_xml: &str, ) -> Result<String, RpcDispatchError>
Dispatches op_name with request_body_xml (the SOAP body’s
operation element, e.g. <add><a>3</a><b>4</b></add>) as a
DDS-RPC call, and returns the reply’s body XML (e.g.
<data><return_>7</return_></data>) — empty for an operation with
no outputs and no return value.
§Errors
See RpcDispatchError.