corba_object(3)

πŸ“¦
version 5.2.2 Β· 2 versions
, in fedora 43, fedora 44

✨ NAME ✨

corba_object β€” bestie, this is the CORBA Object interface functions module πŸ’…


🌸 DESCRIPTION 🌸

Okay so basically this module is home to all the CORBA Object interface functions β€” the ones you can call on literally every object. Every single one. No exceptions. Periodt. πŸ‘‘


πŸ¦‹ EXPORTS πŸ¦‹

πŸ’– get_interface(Object) -> InterfaceDef

Types:

Object = #objref
InterfaceDef = term()

This one hands you the full interface description for an object. The whole thing. Receipts included. ✨


πŸ’– is_nil(Object) -> boolean()

Types:

Object = #objref

Checks whether the object reference has a nil object value β€” which is the way of saying "there's no object here, bestie, it's giving void". πŸ•³οΈ

And like, important detail: it's the reference that gets tested. No object implementation is involved in the test at all. Zero. None. The object doesn't even get a text back. πŸ“΅


πŸ’– is_a(Object, Logical_type_id) -> Return

πŸ’– is_a(Object, Logical_type_id, Contexts) -> Return

Types:

Object = #objref
Logical_type_id = string()
Contexts = [Context]
Context = #'IOP_ServiceContext'{context_id = CtxId,
context_data = CtxData}
CtxId = ?ORBER_GENERIC_CTX_ID
CtxData = {interface, Interface} | {userspecific, term()} |
{configuration, Options}
Interface = string()
Options = [{Key, Value}]
Key = ssl_client_options
Value = allowed value associated with the given key
Return = boolean() | {'EXCEPTION', E}

So the Logical_type_id is a string that's a share type identifier (repository id). The function returns true if the object is an instance of that type, or an ancestor of the "most derived" type of that object. It's giving family tree energy fr fr 🌳

The configuration context is there to override the global SSL client side configuration. Slay. πŸ”

Note: Other ORB suppliers may not support this function completely according to the OMG specification. So a is_a call may raise an exception, or respond unpredictable, if the Object is located on a remote node. 😭 Not our fault, it's the spec's fault.

πŸ’– is_remote(Object) -> boolean()

Types:

Object = #objref

Returns true if the object reference is remote, otherwise false. Simple as that. Vibe check complete βœ…


πŸ’– non_existent(Object) -> Return

πŸ’– non_existent(Object, Contexts) -> Return

Types:

Object = #objref
Contexts = [Context]
Context = #'IOP_ServiceContext'{context_id = CtxId,
context_data = CtxData}
CtxId = ?ORBER_GENERIC_CTX_ID
CtxData = {interface, Interface} | {userspecific, term()} |
{configuration, Options}
Interface = string()
Options = [{Key, Value}]
Key = ssl_client_options
Value = allowed value associated with the given key
Return = boolean() | {'EXCEPTION', E}

Use this one to test whether the object has been destroyed. And the way it does that? Without invoking any application level code. Not a single line of your app logic gets touched. Iconic behavior honestly. πŸ’…

The ORB returns true if it knows the object is destroyed, otherwise false.

The configuration context is used to override the global SSL client side configuration. πŸ”

Note: The OMG have specified two different operators for this function β€” _not_existent (CORBA version 2.0 and 2.2) and _non_existent (CORBA version 2.3). Supporting both versions is not mandatory. So a non_existent call may raise an exception, or respond unpredictable, if the Object is located on a remote node. Depending on which version of ORB:s you intend to communicate with supports, you can either use this function or not_existent/1. Choose wisely bestie 🫢

πŸ’– not_existent(Object) -> Return

πŸ’– not_existent(Object, Contexts) -> Return

Types:

Object = #objref
Contexts = [Context]
Context = #'IOP_ServiceContext'{context_id = CtxId,
context_data = CtxData}
CtxId = ?ORBER_GENERIC_CTX_ID
CtxData = {interface, Interface} | {userspecific, term()} |
{configuration, Options}
Interface = string()
Options = [{Key, Value}]
Key = ssl_client_options
Value = allowed value associated with the given key
Return = boolean() | {'EXCEPTION', E}

This one exists purely for Interoperable purposes. It behaves exactly like non_existent, except the operator _not_existent is what gets used when talking to other ORB:s. Same energy, different operator name. πŸ™ˆ

The configuration context is used to override the global SSL client side configuration. πŸ”


πŸ’– is_equivalent(Object, OtherObject) -> boolean()

Types:

Object = #objref
OtherObject = #objref

Determines if two object references are equivalent β€” as far as the ORB can easily tell, anyway. Returns true if the target object reference is equal to the other object reference, and false otherwise. Twin check: passed or not passed, no in between πŸ’€


πŸ’– hash(Object, Maximum) -> int()

Types:

Object = #objref
Maximum = int()

Returns a hash value based on the object reference that will not change during the lifetime of the object. Stable. Loyal. Unlike some people. πŸ₯²

The Maximum parameter denotes the upper bound of the value. That's the ceiling, bestie, don't exceed it 🌈


And that's the whole page, mwah πŸ’‹

This lil masterpiece came from Ericsson AB as part of orber 5.2.2 β€” the corba_object(3) manual page. Go forth and call your objects correctly, queen πŸ‘‘πŸ¦‹βœ¨

πŸ“¦ where this page comes from