Skip to main content

OrbOptions

Struct OrbOptions 

Source
pub struct OrbOptions {
Show 35 fields pub max_giop_version: Version, pub byte_order: ByteOrder, pub connect_timeout: Option<Duration>, pub request_timeout: Option<Duration>, pub max_message_size: usize, pub fragment_size: usize, pub max_forwards: u32, pub init_refs: HashMap<String, String>, pub default_init_ref: Option<String>, pub io_threads: usize, pub endpoints: Vec<EndpointAddr>, pub endpoint_publish: Option<EndpointAddr>, pub min_server_threads: usize, pub max_server_threads: usize, pub server_thread_idle_timeout: Duration, pub follow_linger: Duration, pub follow_limit: usize, pub max_requests_per_connection: usize, pub client_idle_timeout: Option<Duration>, pub server_idle_timeout: Option<Duration>, pub max_server_connections: usize, pub offer_bidir: bool, pub accept_bidir: bool, pub socket_send_buffer: Option<usize>, pub socket_receive_buffer: Option<usize>, pub tls_endpoints: Vec<EndpointAddr>, pub tls_endpoint_publish: Option<EndpointAddr>, pub unix_endpoints: Vec<String>, pub tls: TlsOptions, pub trace_level: Option<u32>, pub trace_time: Option<bool>, pub arguments: Vec<String>, pub orb_id: String, pub server_id: String, pub initializers: Vec<Arc<dyn OrbInitializer>>,
}
Expand description

Settings of an Orb.

Fields§

§max_giop_version: Version

The highest GIOP version used for requests. A request uses the lower of this and the version of the target’s IIOP profile.

§byte_order: ByteOrder

Byte order of the messages rustorb sends.

§connect_timeout: Option<Duration>

How long to wait for a TCP connection; None waits until the call timeout expires, or as long as the operating system does. Expiry raises TIMEOUT, completed no. The initial value of Orb::set_connect_timeout.

§request_timeout: Option<Duration>

How long to wait for a reply; None waits forever. Expiry raises TIMEOUT, completed maybe. The initial value of Orb::set_call_timeout; see there for the timeouts that override it.

§max_message_size: usize

Largest GIOP message, header included and fragments joined, that the ORB sends or accepts (-ORBgiopMaxMsgSize N; default 64 MiB). A request over it is not sent (MARSHAL, completed no), a reply over it is replaced by MARSHAL, completed yes; a message received over it closes the connection.

§fragment_size: usize

Splits GIOP 1.2 requests and replies longer than this many bytes into Fragment messages of at most this length (-ORBgiopFragmentSize N; at least 1024, rounded down to a multiple of 8). 0, the default, sends every message whole. GIOP 1.1 messages are never split. See docs/message-size.md.

§max_forwards: u32

How many LOCATION_FORWARD replies one invocation follows before it gives up with TRANSIENT.

§init_refs: HashMap<String, String>

Initial references by name (-ORBInitRef Name=URL).

§default_init_ref: Option<String>

Base URL for initial references not in init_refs (-ORBDefaultInitRef URL); the name is appended after a /.

§io_threads: usize

Number of tokio worker threads for network I/O.

§endpoints: Vec<EndpointAddr>

Addresses to listen on for requests (-ORBendPoint giop:tcp:HOST:PORT). Empty means one endpoint on every interface with a port the operating system chooses. The server side starts listening when the RootPOA is first used.

§endpoint_publish: Option<EndpointAddr>

Address published in IORs instead of the listening one (-ORBendPointPublish giop:tcp:HOST:PORT); a port of 0 keeps the listening port.

§min_server_threads: usize

Upcall threads kept running even when idle.

§max_server_threads: usize

Most upcall threads running at once (-ORBmaxServerThreadPoolSize). Requests beyond that wait in a queue.

§server_thread_idle_timeout: Duration

How long an upcall thread beyond min_server_threads waits for work before it ends.

§follow_linger: Duration

How long an upcall thread that answered a request waits for the next request of the same connection, to read and run it itself (-ORBfollowLinger US, in microseconds; docs/read-ownership.md). Zero turns this off: the I/O task reads every request.

§follow_limit: usize

How many requests of one connection an upcall thread reads in a row before it lets the I/O task read again (-ORBfollowLimit N). Zero turns this off.

§max_requests_per_connection: usize

Requests of one connection that may wait or run at once. Beyond that the connection is not read until one completes.

§client_idle_timeout: Option<Duration>

Closes a client connection nothing was sent or received on for this long, with no reply awaited (-ORBoutConScanPeriod S, in seconds, 0 for never; default 120 s). The next call opens a new one. See docs/connections.md.

§server_idle_timeout: Option<Duration>

Closes a server connection with CloseConnection when no request came in for this long and none is running (-ORBinConScanPeriod S, in seconds, 0 for never; default 180 s).

§max_server_connections: usize

Most connections the server side keeps open at once (-ORBmaxServerConnections N; 0, the default, for no limit). At the limit the connection used least recently, of those with no request running, is closed with CloseConnection, and new connections wait in the listen backlog until one ends.

§offer_bidir: bool

Offers the connections this ORB opens for requests from the server (bidirectional GIOP, -ORBofferBiDirectionalGIOP 0|1; default off): GIOP 1.2 requests carry the addresses of this ORB’s endpoints in a BI_DIR_IIOP service context, and requests that come back over the connection reach the POAs with the BidirectionalPolicy BOTH. See docs/bidir-giop.md.

§accept_bidir: bool

Uses a connection a client offered for bidirectional GIOP to call the objects at the addresses it gave (-ORBacceptBiDirectionalGIOP 0|1; default off). See docs/bidir-giop.md for when the addresses are believed.

§socket_send_buffer: Option<usize>

The socket send buffer of each connection (SO_SNDBUF), client and server; None leaves the operating system’s default (which on Linux grows as needed).

§socket_receive_buffer: Option<usize>

The socket receive buffer of each connection (SO_RCVBUF); None leaves the operating system’s default.

§tls_endpoints: Vec<EndpointAddr>

Addresses to listen on for requests over TLS (SSLIOP, -ORBendPoint giop:ssl:HOST:PORT). Published in the TAG_SSL_SEC_TRANS component of IORs; with TLS endpoints and none in endpoints, the ORB has no unprotected endpoint. Needs tls with a key file.

§tls_endpoint_publish: Option<EndpointAddr>

Address published for the first TLS endpoint instead of the listening one (-ORBendPointPublish giop:ssl:HOST:PORT).

§unix_endpoints: Vec<String>

Unix domain sockets to listen on (omniORB’s -ORBendPoint giop:unix:PATH, Linux and macOS only): each entry is the path of the socket. An empty path is a new socket in /tmp/omni-USER/, and a path ending in / a new socket in that directory. Published in the TAG_OMNIORB_UNIX_TRANS components of IORs, which clients on the same host use before TCP. See docs/unix-transport.md.

§tls: TlsOptions

Certificates, key and checks of TLS connections, client and server.

§trace_level: Option<u32>

The trace level of the process (-ORBtraceLevel N), set when the ORB is created; None leaves it as it is (1 at first). See trace and docs/tracing.md.

§trace_time: Option<bool>

Whether trace lines on standard error start with the time (-ORBtraceTime 0|1), set when the ORB is created; None leaves it as it is (off at first).

§arguments: Vec<String>

The arguments the ORB was created with, for OrbInitInfo::arguments. Orb::init sets them to its arguments, ORB options included.

§orb_id: String

The ORB id (-ORBid), for the Portable Interceptors.

§server_id: String

The server id (-ORBServerId), for the Portable Interceptors.

§initializers: Vec<Arc<dyn OrbInitializer>>

The OrbInitializers of this ORB, run after those of register_orb_initializer (docs/portable-interceptors.md).

Implementations§

Source§

impl OrbOptions

Source

pub fn parse_args( &mut self, args: &mut Vec<String>, ) -> Result<(), SystemException>

Reads ORB options from command line arguments and removes them, like CORBA::ORB_init. Other arguments are left in place.

OptionSetting
-ORBInitRef Name=URLinit_refs
-ORBid IDorb_id
-ORBServerId IDserver_id
-ORBDefaultInitRef URLdefault_init_ref
-ORBmaxGIOPVersion 1.1max_giop_version
-ORBgiopMaxMsgSize Nmax_message_size, in bytes (at least 1024)
-ORBgiopFragmentSize Nfragment_size, in bytes (0, or at least 1024)
-ORBclientConnectTimeOutPeriod MSconnect_timeout (0 for none)
-ORBclientCallTimeOutPeriod MSrequest_timeout (0 for none)
-ORBsupportPerThreadTimeOut 0|1accepted and ignored: per-thread timeouts always work
-ORBendPoint giop:tcp:HOST:PORTendpoints (repeatable)
-ORBendPointPublish giop:tcp:HOST:PORTendpoint_publish (all(addr) for the default)
-ORBmaxServerThreadPoolSize Nmax_server_threads
-ORBfollowLinger USfollow_linger, in microseconds
-ORBfollowLimit Nfollow_limit
-ORBoutConScanPeriod Sclient_idle_timeout, in seconds (0 for never)
-ORBinConScanPeriod Sserver_idle_timeout, in seconds (0 for never)
-ORBmaxServerConnections Nmax_server_connections (0 for no limit)
-ORBofferBiDirectionalGIOP 0|1offer_bidir
-ORBacceptBiDirectionalGIOP 0|1accept_bidir
-ORBendPoint giop:ssl:HOST:PORTtls_endpoints (repeatable)
-ORBendPointPublish giop:ssl:HOST:PORTtls_endpoint_publish
-ORBendPoint giop:unix:PATHunix_endpoints (repeatable; Unix only)
-ORBsslCAFile PATHTlsOptions::ca_file
-ORBsslCertFile PATHTlsOptions::cert_file
-ORBsslKeyFile PATHTlsOptions::key_file
-ORBsslVerifyClient none|optional|requiredTlsOptions::client_auth
-ORBsslVerifyHost 0|1TlsOptions::verify_host
-ORBtraceLevel Ntrace_level
-ORBtraceTime 0|1trace_time

The value may also follow the option name after =, as in -ORBmaxGIOPVersion=1.1.

Trait Implementations§

Source§

impl Clone for OrbOptions

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OrbOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for OrbOptions

Source§

fn default() -> OrbOptions

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more