Skip to main content

AsyncCorbaChannel

Trait AsyncCorbaChannel 

Source
pub trait AsyncCorbaChannel {
    // Required methods
    fn send(
        &mut self,
        operation: &str,
        payload: &[u8],
        cb: AsyncReplyCallback,
    ) -> Result<u32, CorbaException>;
    fn send_poll(
        &mut self,
        operation: &str,
        payload: &[u8],
    ) -> Result<u32, CorbaException>;
    fn get_reply(
        &mut self,
        request_id: u32,
    ) -> Result<AsyncReply, CorbaException>;
    fn perform_work(&mut self) -> Result<u32, CorbaException>;
    fn perform_all(&mut self) -> Result<(), CorbaException>;
}
Expand description

Abstract asynchronous GIOP channel to ONE target object (CORBA Messaging §22) used by the generated AMI stubs (sendc_/sendp_). Implemented by the transport layer (zerodds-corba-interop::AmiClient) — same layering pattern as CorbaConnection for the synchronous side.

The stubs marshal the in-args into payload (big-endian) and decode the reply in a typed way; this channel carries only opaque bytes + the request_id demux.

Required Methods§

Source

fn send( &mut self, operation: &str, payload: &[u8], cb: AsyncReplyCallback, ) -> Result<u32, CorbaException>

Callback model (§22.5): fires operation(payload) and registers cb for the reply; returns the request_id.

§Errors

Transport error during sending.

Source

fn send_poll( &mut self, operation: &str, payload: &[u8], ) -> Result<u32, CorbaException>

Polling model (§22.6): fires operation(payload), returns the request_id; the reply is fetched via get_reply.

§Errors

Transport error during sending.

Source

fn get_reply(&mut self, request_id: u32) -> Result<AsyncReply, CorbaException>

Drives the channel until the reply for request_id (from send_poll) is available, and returns it.

§Errors

Transport error, or request_id is not open.

Source

fn perform_work(&mut self) -> Result<u32, CorbaException>

Reads EXACTLY one arrived reply (blocking) and dispatches it (callback invocation or storage); returns the handled request_id.

§Errors

Transport error, or nothing is open.

Source

fn perform_all(&mut self) -> Result<(), CorbaException>

Drives perform_work until all callback requests are processed.

§Errors

Transport error.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§