User's Guide
Reference Manual
Release Notes
PDF
Top

orber
Reference Manual
Version 3.6.26.1

Expand All
Contract All

Table of Contents

- any
  - Top of manual page
  - create/0
  - create/2
  - set_typecode/2
  - get_typecode/1
  - set_value/2
  - get_value/1
- fixed
  - Top of manual page
  - create/3
  - get_typecode/1
  - add/2
  - subtract/2
  - multiply/2
  - divide/2
  - unary_minus/1
- corba
  - Top of manual page
  - create/2
  - create/3
  - create/4
  - create_link/2
  - create_link/3
  - create_link/4
  - dispose/1
  - create_nil_objref/0
  - create_subobject_key/2
  - get_subobject_key/1
  - get_pid/1
  - raise/1
  - reply/2
  - resolve_initial_references/1
  - resolve_initial_references/2
  - add_initial_service/2
  - remove_initial_service/1
  - list_initial_services/0
  - resolve_initial_references_remote/2
  - resolve_initial_references_remote/3
  - list_initial_services_remote/1
  - list_initial_services_remote/2
  - object_to_string/1
  - string_to_object/1
  - string_to_object/2
  - print_object/1
  - add_alternate_iiop_address/3
  - orb_init/1
- corba_object
  - Top of manual page
  - get_interface/1
  - is_nil/1
  - is_a/2
  - is_a/3
  - is_remote/1
  - non_existent/1
  - non_existent/2
  - not_existent/1
  - not_existent/2
  - is_equivalent/2
  - hash/2
- orber
  - Top of manual page
  - start/0
  - start/1
  - jump_start/1
  - stop/0
  - info/0
  - info/1
  - exception_info/1
  - is_system_exception/1
  - get_tables/0
  - get_ORBInitRef/0
  - get_ORBDefaultInitRef/0
  - domain/0
  - iiop_port/0
  - iiop_out_ports/0
  - iiop_out_ports_random/0
  - iiop_out_ports_attempts/0
  - iiop_ssl_port/0
  - iiop_timeout/0
  - iiop_connection_timeout/0
  - iiop_connections/0
  - iiop_connections/1
  - iiop_connections_pending/0
  - iiop_in_connection_timeout/0
  - iiop_acl/0
  - activate_audit_trail/0
  - activate_audit_trail/1
  - deactivate_audit_trail/0
  - add_listen_interface/2
  - add_listen_interface/3
  - add_listen_interface/3
  - remove_listen_interface/1
  - close_connection/1
  - close_connection/2
  - secure/0
  - ssl_server_options/0
  - ssl_client_options/0
  - set_ssl_client_options/1
  - objectkeys_gc_time/0
  - orber_nodes/0
  - install/1
  - install/2
  - uninstall/0
  - add_node/2
  - remove_node/1
  - configure/2
- orber_ifr
  - Top of manual page
  - init/2
  - find_repository/0
  - get_def_kind/1
  - destroy/1
  - get_id/1
  - set_id/2
  - get_name/1
  - set_name/2
  - get_version/1
  - set_version/2
  - get_defined_in/1
  - get_absolute_name/1
  - get_containing_repository/1
  - describe/1
  - move/4
  - lookup/2
  - contents/3
  - lookup_name/5
  - describe_contents/4
  - create_module/4
  - create_constant/6
  - create_struct/5
  - create_union/6
  - create_enum/5
  - create_alias/5
  - create_interface/5
  - create_exception/5
  - get_type/1
  - lookup_id/2
  - get_primitive/2
  - create_string/2
  - create_wstring/2
  - create_fixed/3
  - create_sequence/3
  - create_array/3
  - create_idltype/2
  - get_type_def/1
  - set_type_def/2
  - get_value/1
  - set_value/2
  - get_members/1
  - set_members/2
  - get_discriminator_type/1
  - get_discriminator_type_def/1
  - set_discriminator_type_def/2
  - get_original_type_def/1
  - set_original_type_def/2
  - get_kind/1
  - get_bound/1
  - set_bound/2
  - get_element_type/1
  - get_element_type_def/1
  - set_element_type_def/2
  - get_length/1
  - set_length/2
  - get_mode/1
  - set_mode/2
  - get_result/1
  - get_result_def/1
  - set_result_def/2
  - get_params/1
  - set_params/2
  - get_contexts/1
  - set_contexts/2
  - get_exceptions/1
  - set_exceptions/2
  - get_base_interfaces/1
  - set_base_interfaces/2
  - is_a/2
  - describe_interface/1
  - create_attribute/6
  - create_operation/9
- orber_tc
  - Top of manual page
  - null/0
  - void/0
  - short/0
  - unsigned_short/0
  - long/0
  - unsigned_long/0
  - long_long/0
  - unsigned_long_long/0
  - wchar/0
  - float/0
  - double/0
  - boolean/0
  - char/0
  - octet/0
  - any/0
  - typecode/0
  - principal/0
  - object_reference/2
  - struct/3
  - union/5
  - enum/3
  - string/1
  - wstring/1
  - fixed/2
  - sequence/2
  - array/2
  - alias/3
  - exception/3
  - get_tc/1
  - get_tc/1
  - check_tc/1
- orber_acl
  - Top of manual page
  - match/2
  - match/3
  - verify/3
  - range/2
- CosNaming
- CosNaming_NamingContext
  - Top of manual page
  - bind/3
  - rebind/3
  - bind_context/3
  - rebind_context/3
  - resolve/2
  - unbind/2
  - new_context/1
  - bind_new_context/2
  - destroy/1
  - list/2
- CosNaming_NamingContextExt
  - Top of manual page
  - to_string/2
  - to_name/2
  - to_url/3
  - resolve_str/2
- CosNaming_BindingIterator
  - Top of manual page
  - next_one/1
  - next_n/2
  - destroy/1
- lname
  - Top of manual page
  - create/0
  - insert_component/3
  - get_component/2
  - delete_component/2
  - num_component/1
  - equal/2
  - less_than/2
  - to_idl_form/1
  - from_idl_form/1
- lname_component
  - Top of manual page
  - create/0
  - get_id/1
  - set_id/2
  - get_kind/1
  - set_kind/2
- Module_Interface
  - Top of manual page
  - Module_Interface:typeID/0
  - Module_Interface:oe_create/0
  - Module_Interface:oe_create_link/0
  - Module_Interface:oe_create/1
  - Module_Interface:oe_create_link/1
  - Module_Interface:oe_create/2
  - Module_Interface:oe_create_link/2
  - Module_Interface:own_functions/4
  - Module_Interface:own_functions/5
  - Module_Interface_impl:init/1
  - Module_Interface_impl:terminate/2
  - Module_Interface_impl:code_change/3
  - Module_Interface_impl:handle_info/2
  - Module_Interface_impl:own_functions/4
  - Module_Interface_impl:own_functions/5
  - Module_Interface_impl:own_functions/6
  - Module_Interface_impl:own_functions/5
  - Module_Interface_impl:own_functions/4
  - Module_Interface_impl:own_functions/5
- interceptors
  - Top of manual page
  - new_in_connection/3
  - new_in_connection/5
  - new_out_connection/3
  - new_out_connection/5
  - closed_in_connection/1
  - closed_out_connection/1
  - in_reply/6
  - in_reply_encoded/6
  - in_request/6
  - in_request_encoded/6
  - out_reply/6
  - out_reply_encoded/6
  - out_request/6
  - out_request_encoded/6
- orber_diagnostics
  - Top of manual page
  - nameservice/0
  - nameservice/1
  - missing_modules/0

# corba

### MODULE

corba

### MODULE SUMMARY

The functions on CORBA module level

### DESCRIPTION

This module contains functions that are specified on the CORBA module level. It also contains some functions for creating and disposing objects.

### EXPORTS

create(Module, TypeID) -> Object
create(Module, TypeID, Env) -> Object
create(Module, TypeID, Env, Optons1) -> Object
create_link(Module, TypeID) -> Object
create_link(Module, TypeID, Env) -> Object
create_link(Module, TypeID, Env, Options2) -> Reply

Types:

Module = atom()
TypeID = string()
Env = term()
Options1 = [{persistent, Bool} | {regname, RegName} | {local_typecheck, Bool}]
Options2 = [{sup_child, Bool} | {persistent, Bool} | {regname, RegName} | {pseudo, Bool} | {local_typecheck, Bool}]
RegName = {local, atom()} | {global, term()}
Reply = #objref | {ok, Pid, #objref}
Bool = true | false
Object = #objref

These functions start a new server object. If you start it without RegName it can only be accessed through the returned object key. Started with a RegName the name is registered locally or globally.

TypeID is the repository ID of the server object type and could for example look like "IDL:StackModule/Stack:1.0".

Module is the name of the interface API module.

Env is the arguments passed which will be passed to the implementations init call-back function.

A server started with create/2, create/3 or create/4 does not care about the parent, which means that the parent is not handled explicitly in the generic process part.

A server started with create_link2, create_link/3 or create_link/4 is initially linked to the caller, the parent, and it will terminate whenever the parent process terminates, and with the same reason as the parent. If the server traps exits, the terminate/2 call-back function is called in order to clean up before the termination. These functions should be used if the server is a worker in a supervision tree.

If you use the option {sup_child, true} create_link/4 will return {ok, Pid, #objref}, otherwise #objref, and make it possible to start a server as a supervisor child (stdlib-1.7 or later).

If you use the option {persistent, true} you also must use the option {regname, {global, Name}}. This combination makes it possible to tell the difference between a server permanently terminated or in the process of restarting.

The option {pseudo, true}, allow us to create an object which is not a server. Using {pseudo, true} overrides all other start options. For more information see section Module_Interface.

If a server is started using the option {persistent, true} the object key will not be removed unless it terminates with reason normal or shutdown. Hence, if persistent servers is used as supervisor children they should be transient and the objectkeys_gc_time should be modified (default equals infinity).

The option {local_typecheck, boolean()}, which overrides the Local Typechecking environment flag, turns on or off typechecking. If activated, parameters, replies and raised exceptions will be checked to ensure that the data is correct, when invoking operations on CORBA Objects within the same Orber domain. Due to the extra overhead, this option MAY ONLY be used during testing and development.

    Example:

      corba:create('StackModule_Stack', "IDL:StackModule/Stack:1.0", {10, test})

dispose(Object) -> ok

Types:

Object = #objref

This function is used for terminating the execution of a server object. Invoking this operation on a NIL object reference, e.g., the return value of corba:create_nil_objref/0, always return ok. For valid object references, invoking this operation more than once, will result in a system exception.

create_nil_objref() -> Object

Types:

Object = #objref representing NIL.

Creates an object reference that represents the NIL value. Attempts to invoke operations using the returned object reference will return a system exception.

create_subobject_key(Object, Key) -> Result

Types:

Object = #objref
Key = term()
Result = #objref

This function is used to create a subobject in a server object. It can for example be useful when one wants unique access to separate rows in a mnesia or an ETS table. The Result is an object reference that will be seen as a unique reference to the outside world but will access the same server object where one can use the get_subobject_key/1 function to get the private key value.

Key is stored in the object reference Object. If it is a binary it will be stored as is and otherwise it is converted to a binary before storage.

get_subobject_key(Object) -> Result

Types:

Object = #objref
Result = #binary

This function is used to fetch a subobject key from the object reference Object. The result is a always a binary, if it was an Erlang term that was stored with create_subobject_key/2 one can to do binary_to_term/1 to get the real value.

get_pid(Object) -> Result

Types:

Object = #objref
Result = #pid | {error, Reason} | {'EXCEPTION',E}

This function is to get the process id from an object, which is a must when CORBA objects is started/handled in a supervisor tree. The function will throw exceptions if the key is not found or some other error occurs.

raise(Exception)

Types:

Exception = record()

This function is used for raising corba exceptions as an Erlang user generated exit signal. It will throw the tuple {'EXCEPTION', Exception}.

reply(To, Reply) -> true

Types:

To = client reference
Reply = IDL type

This function can be used by a CORBA object to explicitly send a reply to a client that invoked a two-way operation. If this operation is used, it is not possible to return a reply in the call-back module.
To must be the From argument provided to the callback function, which requires that the IC option from was used when compiling the IDL-file.

resolve_initial_references(ObjectId) -> Object
resolve_initial_references(ObjectId, Contexts) -> Object

Types:

ObjectId = 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
Object = #objref

This function returns the object reference associated with the given object id. Initially, only "NameService" is available. To add or remove services use add_initial_service/2 or remove_initial_service/1.

The configuration context is used to override the global SSL client side configuration.

add_initial_service(ObjectId, Object) -> boolean()

Types:

ObjectId = string()
Object = #objref

This operation allows us to add initial services, which can be accessed by using resolve_initial_references/1 or the corbaloc schema. If using an Id defined by the OMG, the given object must be of the correct type; for more information see the Interoperable Naming Service. Returns false if the given id already exists.

remove_initial_service(ObjectId) -> boolean()

Types:

ObjectId = string()

If we don not want a certain service to be accessible, invoking this function will remove the association. Returns true if able to terminate the binding. If no such binding existed false is returned.

list_initial_services() -> [ObjectId]

Types:

ObjectId = string()

This function returns a list of allowed object id's.

resolve_initial_references_remote(ObjectId, Address) -> Object
resolve_initial_references_remote(ObjectId, Address, Contexts) -> Object

Types:

ObjectId = string()
Address = [RemoteModifier]
RemoteModifier = 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
Object = #objref

This function returns the object reference for the object id asked for. The remote modifier string has the following format: "iiop://host:port".

The configuration context is used to override the global SSL client side configuration.

Warning

This operation is not supported by most ORB's. Hence, use corba:string_to_object/1 instead.

list_initial_services_remote(Address) -> [ObjectId]
list_initial_services_remote(Address, Contexts) -> [ObjectId]

Types:

Address = [RemoteModifier]
RemoteModifier = 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
ObjectId = string()

This function returns a list of allowed object id's. The remote modifier string has the following format: "iiop://host:port".

The configuration context is used to override the global SSL client side configuration.

Warning

This operation is not supported by most ORB's. Hence, avoid using it.

object_to_string(Object) -> IOR_string

Types:

Object = #objref
IOR_string = string()

This function returns the object reference as the external string representation of an IOR.

string_to_object(IOR_string) -> Object
string_to_object(IOR_string, Contexts) -> Object

Types:

IOR_string = 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
Object = #objref

This function takes a corbaname, corbaloc or an IOR on the external string representation and returns the object reference.

To lookup the NameService reference, simply use "corbaloc:iiop:1.2@123.0.0.012:4001/NameService"

We can also resolve an object from the NameService by using "corbaname:iiop:1.2@123.0.0.012:4001/NameService#org/Erlang/MyObj"

For more information about corbaname and corbaloc, see the User's Guide (Interoperable Naming Service).

The configuration context is used to override the global SSL client side configuration.

How to handle the interface context is further described in the User's Guide.

print_object(Data [, Type]) -> ok | {'EXCEPTION', E} | {'EXIT', R} | string()

Types:

Data = IOR_string | #objref (local or external) | corbaloc/corbaname string
Type = IoDevice | error_report | {error_report, Reason} | info_msg | {info_msg, Comment} | string
IoDevice = see the io-module
Reason = Comment = string()

The object represented by the supplied data is dissected and presented in a more readable form. The Type parameter is optional; if not supplied standard output is used. For error_report and info_msg the error_logger module is used, with or without Reason or Comment. If the atom string is supplied this function will return a flat list. The IoDevice is passed to the operation io:format/2.

If the supplied object is a local reference, the output is equivalent to an object exported from the node this function is invoked on.

add_alternate_iiop_address(Object, Host, Port) -> NewObject | {'EXCEPTION', E}

Types:

Object = NewObject = local #objref
Host = string()
Port = integer()

This operation creates a new instance of the supplied object containing an ALTERNATE_IIOP_ADDRESS component. Only the new instance contains the new component. When this object is passed to another ORB, which supports the ALTERNATE_IIOP_ADDRESS, requests will be routed to the alternate address if it is not possible to communicate with the main address.

The ALTERNATE_IIOP_ADDRESS component requires that IIOP-1.2 is used. Hence, make sure both Orber and the other ORB is correctly configured.

Note

Make sure that the given Object is accessible via the alternate Host/port. For example, if the object is correctly started as local or pseudo, the object should be available on all nodes within a multi-node Orber installation. Since only one instance exists for other object types, it will not be possible to access it if the node it was started on terminates.

orb_init(KeyValueList) -> ok | {'EXIT', Reason}

Types:

KeyValueList = [{Key, Value}]
Key = any key listed in the configuration chapter
Value = allowed value associated with the given key

This function allows the user to configure Orber in, for example, an Erlang shell. Orber may NOT be started prior to invoking this operation. For more information, see configuration settings in the User's Guide.