Expand description
ORB core: connection management, request dispatch and the POA.
Network I/O runs on an internal multi-threaded tokio runtime, and servants are invoked on a separate pool of long-lived ORB threads. The public API is synchronous.
The client side:
Orbowns the runtime and a pool of GIOP connections, one per server endpoint.Orb::string_to_objectaccepts stringified IORs,corbaloc:andcorbaname:URLs, andOrb::resolve_initial_referencesthe-ORBInitRef/-ORBDefaultInitRefoptions.ObjectRef::requestbuilds a request whose arguments are written to anOutStream;Request::invokereturns aReplyto read with anInStream, or anException. Requests use GIOP 1.0 to 1.2 as the target’s profile allows, followLOCATION_FORWARD, answerNEEDS_ADDRESSING_MODE, try alternate addresses, and are sent again after aCloseConnectionfrom the server.namehas the CosNaming name type and its string form, used forcorbaname:and by the naming service client inrustorb-naming.TypeCodedescribes IDL types, andAnyholds aValueof any type;OutStream::write_anyandInStream::read_anymarshal them, andOutStream::write_value/InStream::read_valuemarshal any value as its TypeCode says.CodeSetsnegotiates the transmission code sets from the IOR and convertsstringdata; rustorb’s native code sets are UTF-8 and UTF-16.
The server side, started by Orb::root_poa:
- The ORB listens on
OrbOptions::endpointsand answers GIOP 1.0 to 1.2 requests in the version they came in. Poais the RootPOA and the POAs created under it, with theirPolicyvalues, active object maps andPoaManagers. Object keys of PERSISTENT POAs have omniORB’s format, so references survive a switch between the two.- A
Servantreads its arguments from anInStreamand writes the result or a user exception to aServerReply. Servants run on a pool of long-lived upcall threads, never on the I/O threads, and requests of one connection run in parallel. SINGLE_THREAD_MODEL POAs run their requests one at a time, and MAIN_THREAD_MODEL ones on the thread inOrb::runorOrb::perform_work. - Objects not in the active object map can be served by a default
servant, a
ServantActivatoror aServantLocator, and child POAs created on demand by anAdapterActivator.PoaCurrenttells a servant which object a request is for. - Calls to objects of the same ORB do not use the network: the request is marshalled and dispatched on the calling thread.
Orb::runwaits forOrb::shutdown, which finishes the running requests and closes every connection withCloseConnection.
What the ORB does (connections, requests, exceptions, forwards, GIOP
messages) is reported as tracing events;
without a subscriber, -ORBtraceLevel writes them to standard error.
See trace.
Re-exports§
pub use dynany::DynAny;pub use dynany::DynAnyError;pub use dynany::DynAnyFactory;pub use policy::PolicyError;pub use policy::PolicyType;pub use policy::PolicyValue;pub use policy::SetOverrideType;pub use typecode::TCKind;pub use typecode::TypeCode;pub use typecode::TypeCodeError;pub use rustorb_cdr as cdr;pub use rustorb_giop as giop;
Modules§
- dii
- The Dynamic Invocation Interface (DII) and the Dynamic Skeleton Interface (DSI): calls and servants whose operations are described at run time, by TypeCodes, instead of by generated code.
- dynany
DynamicAny: building and taking apart values of types known only by their TypeCode.- idl
- The runtime of the code
rustorb-idl -brustgenerates (seedocs/rust-mapping.md). - iop
IOP::CodecFactoryandIOP::Codec: CDR encapsulations of anys and values, the usual form of service context and tagged component data (seepiand docs/portable-interceptors.md).- minor
- Minor codes defined by the CORBA specification (already including
OMG_VMCID), for the exceptions rustorb raises itself. - name
- CosNaming names and their string form, which
corbaname:URLs use. - pi
- Portable Interceptors (
PortableInterceptor): hooks on the requests an ORB sends and receives and on the references its POAs make. - policy
CORBA::ORB::create_policyand the client side policy overrides of the Messaging specification:Object::set_policy_overrides, the ORB’sPolicyManagerand the thread’sPolicyCurrent.- trace
- Trace output: what the ORB does, for finding interoperability and configuration problems (docs/tracing.md).
- typecode
- TypeCodes (CORBA 3.0, 4.11).
Structs§
- Any
- A value with its type (
CORBA::Any). The default is an empty Any, of typenull. - Async
Request - A request that runs as a future:
Requestfor async code. - Code
Sets - The transmission code sets used on a connection.
- Endpoint
Addr - A TCP address of an endpoint, as in
giop:tcp:HOST:PORT(orgiop:ssl:HOST:PORTfor a TLS endpoint). - Fixed
- The value of an IDL
fixed<digits, scale>: a decimal number with a sign, its digits and the number of them after the decimal point. - InStream
- The stream a reply, a user exception or the arguments of a request are read from.
- Long
Double - A
long doublevalue, kept as its IEEE 754 binary128 bits: the sign in the top bit, a 15-bit exponent biased by 16383 and a 112-bit fraction. - Object
Ref - A reference to a CORBA object, from an IOR.
- Octets
- A
sequence<octet>that shares its bytes instead of copying them. - Orb
- An ORB: the client side, and the server side once the RootPOA is used.
- OrbOptions
- Settings of an
Orb. - OutStream
- The stream request arguments are written to.
- Parse
Fixed Error - The text given to
Fixed::from_stris not a decimal number. - Poa
PortableServer::POA: an object adapter, with its active object map and its child POAs.- PoaCurrent
PortableServer::Current: the POA and ObjectId of the request the calling thread is running. Outside a request, every method fails withPoaError::NoContext.- PoaManager
PortableServer::POAManager: switches the processing of requests for the POAs it manages. A manager starts in the holding state.- Policies
- The policies of one POA.
- Reply
- A normal reply: the return value and the
outandinoutarguments. - Request
- A request being built: the operation, its arguments, and a timeout.
- Server
Reply - The reply a servant writes: the return value and the
outandinoutarguments, in order, or a user exception. - System
Exception - A CORBA system exception: one of the standard exceptions (or another ORB’s own), with its minor code and completion status.
- TlsOptions
- The TLS settings of an ORB (docs/ssliop.md). Files are PEM.
- User
Exception - A user exception raised by the target: its repository id, and the
members, which the caller decodes with
input. - Value
Ref - An instance of a valuetype or a value box: its type and its state.
Enums§
- Bidirectional
BiDirPolicy::BidirectionalPolicyValue(docs/bidir-giop.md).- Client
Auth - Whether a TLS server asks clients for a certificate. A certificate a
client sends is checked against
TlsOptions::ca_file. - Completion
Status CORBA::CompletionStatus.- Exception
- The outcome of an invocation that did not return normally.
- IdAssignment
PortableServer::IdAssignmentPolicyValue.- IdUniqueness
PortableServer::IdUniquenessPolicyValue.- Implicit
Activation PortableServer::ImplicitActivationPolicyValue.- Lifespan
PortableServer::LifespanPolicyValue.- PoaError
- The exceptions of the
PortableServer::POAandPOAManageroperations, and system exceptions. - PoaManager
State PortableServer::POAManager::State.- Policy
- A POA policy, given to
Poa::create_poa. - Request
Processing PortableServer::RequestProcessingPolicyValue.- Resolve
Error - Why
resolve_initial_referencesfailed. - Servant
Manager PortableServer::ServantManager: one of the two kinds.- Servant
Manager Error - What a servant manager raises instead of providing a servant.
- Servant
Retention PortableServer::ServantRetentionPolicyValue.- System
Exception Kind - The standard system exceptions of CORBA 3.
- Thread
Policy PortableServer::ThreadPolicyValue.- Value
- A value of an IDL type. Which variant goes with which type:
Constants§
- OMG_
VMCID - The vendor minor code set id of the OMG (
"OM\0\0"). Minor codes the CORBA specification defines areOMG_VMCID | n.
Traits§
- Adapter
Activator PortableServer::AdapterActivator: creates child POAs on demand, when a request orPoa::find_poanames a child that does not exist.- Servant
- The implementation of a CORBA object, called by a POA.
- Servant
Activator PortableServer::ServantActivator: the servant manager of a POA with the RETAIN and USE_SERVANT_MANAGER policies. It is asked for a servant the first time an object that is not in the active object map gets a request, and the servant stays in the map until the object is deactivated.- Servant
Locator PortableServer::ServantLocator: the servant manager of a POA with the NON_RETAIN and USE_SERVANT_MANAGER policies, asked for a servant for every request.
Functions§
- lookup_
value_ type - The valuetype registered with
register_value_typeforid. - register_
custom_ reader - Sets the reader of the custom valuetype
id(VM_CUSTOM), the unmarshaling half ofCORBA::CustomMarshal. A value of a custom type without a reader is read asMARSHAL, as when no value factory is registered. - register_
value_ type - Makes the valuetype
tcknown to every ORB of the process, so that a value of it can be read where a base type of it is expected. - set_
thread_ call_ timeout - Sets the call timeout of the calling thread, for every ORB:
Some(t)(wheretisNonefor no limit) overrides the ORB’scall_timeout, but not the object reference’s (ObjectRef::set_call_timeout);Noneunsets it. Like omniORB’ssetClientThreadCallTimeout, which omniORB honours only with-ORBsupportPerThreadTimeOut 1; rustorb always does. Returns the previous setting. - set_
value_ type_ resolver - Sets (or, with
None, removes) the resolver asked for repository ids that are not registered; what it finds is registered. - thread_
call_ timeout - The setting of
set_thread_call_timeouton the calling thread. - unregister_
custom_ reader - Forgets the reader of the custom valuetype
id. - unregister_
value_ type - Forgets the valuetype registered for
id.
Type Aliases§
- Cookie
- The cookie a
ServantLocatorpasses frompreinvoketopostinvoke. - Custom
Reader - Reads the state of a custom valuetype from
input, intovalue, a new instance of the type: what the value’s marshaling code wrote, read withInStream::read_valueitem by item. The reader sets the state ofvalueto the items read (each aValue::Any) so that it can be written again, and may set an object of its own withValueRef::set_native. - Native
- An object of a language binding that stands for a
ValueRef. - Object
Id PortableServer::ObjectId.- Value
Type Resolver - Finds the valuetype of a repository id that is not registered: a
binding whose valuetypes are only known when asked for (Java, whose
classes are loaded by name) sets one with
set_value_type_resolver.