pub struct ObjectRef { /* private fields */ }Expand description
A reference to a CORBA object, from an IOR.
Invocations try each IIOP profile of the IOR, and each address in it,
until one can be reached. An address of the ORB’s own server side is
not reached through the network: the request is dispatched on the
calling thread. A LOCATION_FORWARD reply makes the
reference use the forwarded IOR from then on (shared by its clones);
when the forwarded object cannot be reached any more, the original IOR
is used again.
Implementations§
Source§impl ObjectRef
impl ObjectRef
Sourcepub fn create_request(&self, operation: &str) -> DiiRequest
pub fn create_request(&self, operation: &str) -> DiiRequest
CORBA::Object::_request: a DiiRequest for operation, with
no arguments and a void result.
Source§impl ObjectRef
impl ObjectRef
Sourcepub fn effective_ior(&self) -> Ior
pub fn effective_ior(&self) -> Ior
The IOR invocations currently go to: the last forwarded one, or the original.
Sourcepub fn is_equivalent(&self, other: &ObjectRef) -> bool
pub fn is_equivalent(&self, other: &ObjectRef) -> bool
CORBA::Object::_is_equivalent: whether both references have the
same profiles, so they certainly denote the same object. false
does not mean they are different objects.
Sourcepub fn request_async<'a>(&'a self, operation: &str) -> AsyncRequest<'a>
pub fn request_async<'a>(&'a self, operation: &str) -> AsyncRequest<'a>
Starts a request for operation that runs as a future
(AsyncRequest).
Sourcepub fn set_call_timeout(&self, timeout: Option<Option<Duration>>)
pub fn set_call_timeout(&self, timeout: Option<Option<Duration>>)
Sets how long calls on this reference and its clones wait for a
reply: Some(t) (where t is None for no limit) overrides the
ORB’s call_timeout and the calling thread’s
(set_thread_call_timeout), and
None unsets it. Like omniORB’s setClientCallTimeout(obj, millisecs). References made from the same IOR by
Orb::string_to_object do not share it.
Sourcepub fn call_timeout(&self) -> Option<Option<Duration>>
pub fn call_timeout(&self) -> Option<Option<Duration>>
The setting of set_call_timeout.
Sourcepub fn non_existent(&self) -> Result<bool, Exception>
pub fn non_existent(&self) -> Result<bool, Exception>
CORBA::Object::_non_existent. OBJECT_NOT_EXIST from the server
counts as true.
Sourcepub async fn is_a_async(&self, repository_id: &str) -> Result<bool, Exception>
pub async fn is_a_async(&self, repository_id: &str) -> Result<bool, Exception>
The async form of is_a.
Sourcepub async fn non_existent_async(&self) -> Result<bool, Exception>
pub async fn non_existent_async(&self) -> Result<bool, Exception>
The async form of non_existent.
Sourcepub fn locate(&self) -> Result<bool, Exception>
pub fn locate(&self) -> Result<bool, Exception>
Sends a LocateRequest, following forwards. Returns whether the
server has the object (OBJECT_HERE) or not (UNKNOWN_OBJECT).
Sourcepub fn locate_async(
&self,
) -> impl Future<Output = Result<bool, Exception>> + Send + '_
pub fn locate_async( &self, ) -> impl Future<Output = Result<bool, Exception>> + Send + '_
The async form of locate.
Sourcepub fn validate_connection(&self) -> Result<bool, Exception>
pub fn validate_connection(&self) -> Result<bool, Exception>
CORBA::Object::validate_connection: binds the reference with a
LocateRequest (following forwards) and returns true. rustorb has
no policy that can forbid a call, so it never returns false. The
failure to bind raises its exception (TRANSIENT, TIMEOUT…),
and an object the server does not have OBJECT_NOT_EXIST.
Source§impl ObjectRef
impl ObjectRef
Sourcepub fn set_policy_overrides(
&self,
policies: &[PolicyValue],
set_add: SetOverrideType,
) -> Result<ObjectRef, SystemException>
pub fn set_policy_overrides( &self, policies: &[PolicyValue], set_add: SetOverrideType, ) -> Result<ObjectRef, SystemException>
CORBA::Object::set_policy_overrides: a new reference to the same
object with these overrides, whose call timeout is its own (this
reference is unchanged). A RelativeRoundtripTimeoutPolicy sets
the new reference’s call_timeout.
NO_PERMISSION for a POA policy.
Sourcepub fn policy_overrides(&self, types: &[PolicyType]) -> Vec<PolicyValue>
pub fn policy_overrides(&self, types: &[PolicyType]) -> Vec<PolicyValue>
CORBA::Object::get_policy_overrides: the overrides of this
reference of the types types, or all of them when types is
empty.
Sourcepub fn client_policy(&self, policy_type: PolicyType) -> Option<PolicyValue>
pub fn client_policy(&self, policy_type: PolicyType) -> Option<PolicyValue>
CORBA::Object::get_client_policy, and get_policy (rustorb reads
no policies from IORs): the policy of type policy_type that
applies to calls from this thread, from the reference’s overrides,
else the thread’s, else the ORB’s. None when no scope has one,
which for the timeout means calls have no limit.