pub struct NamingService { /* private fields */ }Expand description
A CosNaming naming service served by an ORB: the root context and the
contexts created from it, with their bindings in a Store.
The root context answers to the object key NameService, so clients
find it with corbaloc::host:port/NameService as with omniNames. The
other contexts live in a PERSISTENT POA: when the ORB listens on the
same fixed port after a restart, every reference handed out stays
valid. Contexts bound from another naming service are followed by
calling them (federation).
use rustorb_core::Orb;
use rustorb_naming::{LogStore, NamingService};
let mut args = vec!["-ORBendPoint".to_owned(), "giop:tcp::2809".to_owned()];
let orb = Orb::init(&mut args)?;
let service = NamingService::start(&orb, LogStore::new("/var/lib/rustorb-names"))?;
println!("{}", orb.object_to_string(Some(service.root_context().object()))?);
orb.run();Implementations§
Source§impl NamingService
impl NamingService
Sourcepub fn start(
orb: &Orb,
store: impl Store + 'static,
) -> Result<NamingService, StartError>
pub fn start( orb: &Orb, store: impl Store + 'static, ) -> Result<NamingService, StartError>
Starts the naming service on orb, with the state loaded from
store. Creates the POAs under the RootPOA (starting the server
side of the ORB) and activates their manager; the ORB serves the
requests from then on, whether or not a thread runs
Orb::run. The root context is created if the store has none.
Sourcepub fn root_context(&self) -> NamingContextExt
pub fn root_context(&self) -> NamingContextExt
The root context, with the object key NameService.