Skip to main content

Crate rustorb_core

Crate rustorb_core 

Source
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:

The server side, started by Orb::root_poa:

  • The ORB listens on OrbOptions::endpoints and answers GIOP 1.0 to 1.2 requests in the version they came in.
  • Poa is the RootPOA and the POAs created under it, with their Policy values, active object maps and PoaManagers. Object keys of PERSISTENT POAs have omniORB’s format, so references survive a switch between the two.
  • A Servant reads its arguments from an InStream and writes the result or a user exception to a ServerReply. 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 in Orb::run or Orb::perform_work.
  • Objects not in the active object map can be served by a default servant, a ServantActivator or a ServantLocator, and child POAs created on demand by an AdapterActivator. PoaCurrent tells 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::run waits for Orb::shutdown, which finishes the running requests and closes every connection with CloseConnection.

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 -brust generates (see docs/rust-mapping.md).
iop
IOP::CodecFactory and IOP::Codec: CDR encapsulations of anys and values, the usual form of service context and tagged component data (see pi and 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_policy and the client side policy overrides of the Messaging specification: Object::set_policy_overrides, the ORB’s PolicyManager and the thread’s PolicyCurrent.
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 type null.
AsyncRequest
A request that runs as a future: Request for async code.
CallbackRequest
A request that returns at once and hands its reply to a callback: what the sendc_ operations of AMI (docs/ami.md) are built on.
CodeSets
The transmission code sets used on a connection.
EndpointAddr
A TCP address of an endpoint, as in giop:tcp:HOST:PORT (or giop:ssl:HOST:PORT for 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.
LongDouble
A long double value, 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.
ObjectRef
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.
ParseFixedError
The text given to Fixed::from_str is 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 with PoaError::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 out and inout arguments.
Request
A request being built: the operation, its arguments, and a timeout.
ServerReply
The reply a servant writes: the return value and the out and inout arguments, in order, or a user exception.
SystemException
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.
UserException
A user exception raised by the target: its repository id, and the members, which the caller decodes with input.
ValueRef
An instance of a valuetype or a value box: its type and its state.

Enums§

Bidirectional
BiDirPolicy::BidirectionalPolicyValue (docs/bidir-giop.md).
ClientAuth
Whether a TLS server asks clients for a certificate. A certificate a client sends is checked against TlsOptions::ca_file.
CompletionStatus
CORBA::CompletionStatus.
Exception
The outcome of an invocation that did not return normally.
IdAssignment
PortableServer::IdAssignmentPolicyValue.
IdUniqueness
PortableServer::IdUniquenessPolicyValue.
ImplicitActivation
PortableServer::ImplicitActivationPolicyValue.
Lifespan
PortableServer::LifespanPolicyValue.
PoaError
The exceptions of the PortableServer::POA and POAManager operations, and system exceptions.
PoaManagerState
PortableServer::POAManager::State.
Policy
A POA policy, given to Poa::create_poa.
RequestProcessing
PortableServer::RequestProcessingPolicyValue.
ResolveError
Why resolve_initial_references failed.
ServantManager
PortableServer::ServantManager: one of the two kinds.
ServantManagerError
What a servant manager raises instead of providing a servant.
ServantRetention
PortableServer::ServantRetentionPolicyValue.
SystemExceptionKind
The standard system exceptions of CORBA 3.
ThreadPolicy
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 are OMG_VMCID | n.

Traits§

AdapterActivator
PortableServer::AdapterActivator: creates child POAs on demand, when a request or Poa::find_poa names a child that does not exist.
Servant
The implementation of a CORBA object, called by a POA.
ServantActivator
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.
ServantLocator
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_type for id.
register_custom_reader
Sets the reader of the custom valuetype id (VM_CUSTOM), the unmarshaling half of CORBA::CustomMarshal. A value of a custom type without a reader is read as MARSHAL, as when no value factory is registered.
register_value_type
Makes the valuetype tc known 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) (where t is None for no limit) overrides the ORB’s call_timeout, but not the object reference’s (ObjectRef::set_call_timeout); None unsets it. Like omniORB’s setClientThreadCallTimeout, 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_timeout on 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 ServantLocator passes from preinvoke to postinvoke.
CustomReader
Reads the state of a custom valuetype from input, into value, a new instance of the type: what the value’s marshaling code wrote, read with InStream::read_value item by item. The reader sets the state of value to the items read (each a Value::Any) so that it can be written again, and may set an object of its own with ValueRef::set_native.
Native
An object of a language binding that stands for a ValueRef.
ObjectId
PortableServer::ObjectId.
ValueTypeResolver
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.