Skip to main content

ServantLocator

Trait ServantLocator 

Source
pub trait ServantLocator: Send + Sync {
    // Required method
    fn preinvoke(
        &self,
        id: &[u8],
        adapter: &Poa,
        operation: &str,
    ) -> Result<(Arc<dyn Servant>, Cookie), ServantManagerError>;

    // Provided method
    fn postinvoke(
        &self,
        id: &[u8],
        adapter: &Poa,
        operation: &str,
        cookie: Cookie,
        servant: Arc<dyn Servant>,
    ) { ... }
}
Expand description

PortableServer::ServantLocator: the servant manager of a POA with the NON_RETAIN and USE_SERVANT_MANAGER policies, asked for a servant for every request.

Both methods are called on the thread that runs the request.

Required Methods§

Source

fn preinvoke( &self, id: &[u8], adapter: &Poa, operation: &str, ) -> Result<(Arc<dyn Servant>, Cookie), ServantManagerError>

The servant to run operation on the object id of adapter, and a cookie for postinvoke.

Provided Methods§

Source

fn postinvoke( &self, id: &[u8], adapter: &Poa, operation: &str, cookie: Cookie, servant: Arc<dyn Servant>, )

The request that preinvoke provided servant for has run, whatever its outcome. Not called when preinvoke failed.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§