[Ericsson Utvecklings AB]

Module_Interface

MODULE

Module_Interface

MODULE SUMMARY

Orber generated stubs/skeletons.

DESCRIPTION

This module contains the stub/skeleton functions generated by IC.

Starting a Orber server can be done in three ways:

The Orber stub can be used to start a pseudo object, which will create a non-server implementation. A pseudo object introduce some limitations:

By adopting the rules for pseudo objects described above we can use oe_create/2 to create server or pseudo objects, by excluding or including the option {pseudo, true}, without changing the call-back module.

If you start a object without {regname, RegName} it can only be accessed through the returned object key. Started with a {regname, RegName} the name is registered locally or globally.

Warning!

To avoid flooding Orber with old object references start erlang using the flag -orber objectkeys_gc_time Time, which will remove all object references related to servers being dead for Time seconds. To avoid extra overhead, i.e., performing garbage collect if no persistent objects are started, the objectkeys_gc_time default value is infinity. For more information, see the orber and corba documentation.

EXPORTS

typeID() -> TypeId

Types:

TypeId = string(), e.g., "IDL:Module/Interface:1.0"

Returns the Type ID related to this stub/skeleton

oe_create() -> ObjRef

Types:

ObjRef = #object reference

Start a Orber server.

oe_create_link() -> ObjRef

Types:

ObjRef = #object reference

Start a linked Orber server.

oe_create(Env) -> ObjRef

Types:

Env = term()
ObjRef = #object reference

Start a Orber server passing Env to init/1.

oe_create_link(Env) -> ObjRef

Types:

Env = term()
ObjRef = #object reference

Start a linked Orber server passing Env to init/1.

oe_create(Env, Options) -> ObjRef

Types:

Env = term()
ObjRef = #object reference
Options = [{sup_child, false} | {persistent, Bool} | {regname, RegName} | {pseudo, Bool}]
Bool = true | false
RegName = {global, term()} | {local, atom()}

Start a Orber server passing Env to init/1.

If the option {pseudo, true} is used, all other options are overridden. As default, this option is set to false.

This function cannot be used for starting a server as supervisor child. If started as persistent, the options [{persistent, true}, {regname, {global, term()}}] must be used and Orber will only forget the object reference if it terminates with reason normal or shutdown.

oe_create_link(Env, Options) -> Return

Types:

Env = term()
Return = ObjRef | {ok, Pid, ObjRef}
ObjRef = #object reference
Options = [{sup_child, Bool} | {persistent, Bool} | {regname, RegName} | {pseudo, Bool}]
Bool = true | false
RegName = {global, term()} | {local, atom()}

Start a linked Orber server passing Env to init/1.

If the option {pseudo, true} is used, all other options are overridden and no link will be created. As default, this option is set to false.

This function can be used for starting a server as persistent or supervisor child. At the moment [{persistent, true}, {regname, {global, term()}}] must be used to start a server as persistent, i.e., if a server died and is in the process of being restarted a call to the server will not raise 'OBJECT_NOT_EXIST' exception. Orber will only forget the object reference if it terminates with reason normal or shutdown, hence, the server must be started as transient (for more information see the supervisor documentation).

Module_Interface:own_functions(ObjRef, Arg1, ..., ArgN) -> Reply

Types:

ObjRef = #object reference
ArgX = specified in the IDL-code.
Reply = specified in the IDL-code.

If the configuration parameter {timeout, "Module::Interface"} is not passed to IC this function must be called when invoking an operation.

Module_Interface:own_functions(ObjRef, Timeout, Arg1, ..., ArgN) -> Reply

Types:

ObjRef = #object reference
Timeout = int() >= 0 | infinity
ArgX = specified in the IDL-code.
Reply = specified in the IDL-code.

If the configuration parameter {timeout, "Module::Interface"} is passed to IC this function must be called when invoking an operation.

Module_Interface_impl:init(Env) -> CallReply

Types:

Env = term()
CallReply = {ok, State} | {ok, State, Timeout} | ignore | {stop, StopReason}
State = term()
Timeout = int() >= 0 | infinity
StopReason = term()

Whenever a new server is started, init/1 is the first function called in the specified call-back module.

Module_Interface_impl:terminate(Reason, State) -> ok

Types:

Reason = term()
State = term()

This call-back function is called whenever the server is about to terminate.

Module_Interface_impl:code_change(OldVsn, State, Extra) -> CallReply

Types:

OldVsn = undefined | term()
State = term()
Extra = term()
CallReply = {ok, NewState}
NewState = term()

Update the internal State.

Module_Interface_impl:handle_info(Info, State) -> CallReply

Types:

Info = term()
State = term()
CallReply = {noreply, State} | {noreply, State, Timeout} | {stop, StopReason, State}
Timeout = int() >= 0 | infinity
StopReason = normal | shutdown | term()

If the configuration parameter {{handle_info, "Module::Interface"}, true} is passed to IC and process_flag(trap_exit,true) is set in the init() call-back this function must be exported.

Note!

To be able to handle the Timeout option in CallReply in the call-back module the configuration parameter {{handle_info, "Module::Interface"}, true} must be passed to IC.

Module_Interface_impl:own_functions(This, State, Arg1, ..., ArgN) -> CallReply

Types:

This = the servers #object reference
State = term()
ArgX = specified in the IDL-code.
CallReply = {reply, Reply, State} | {reply, Reply, State, Timeout} | {noreply, State} | {noreply, State, Timeout} | {stop, StopReason, Reply, State} | {stop, StopReason, State}
Reply = specified in the IDL-code.
Timeout = int() >= 0 | infinity
StopReason = normal | shutdown | term()

If the configuration parameter {this, "Module::Interface"} is passed to IC and the function is defined to be two-way this function must be exported.

Module_Interface_impl:own_functions(State, Arg1, ..., ArgN) -> CallReply

Types:

State = term()
CallReply = {reply, Reply, State} | {reply, Reply, State, Timeout} | {noreply, State} | {noreply, State, Timeout} | {stop, StopReason, Reply, State} | {stop, StopReason, State}
ArgX = specified in the IDL-code.
Reply = specified in the IDL-code.
Timeout = int() >= 0 | infinity
StopReason = normal | shutdown | term()

If the configuration parameter {this, "Module::Interface"} is not passed to IC and the function is defined to be two-way this function must be exported.

Module_Interface_impl:own_functions(This, State, Arg1, ..., ArgN) -> CallReply

Types:

This = the servers #object reference
State = term()
CallReply = {noreply, State} | {noreply, State, Timeout} | {stop, StopReason, State}
ArgX = specified in the IDL-code.
Reply = specified in the IDL-code.
Timeout = int() >= 0 | infinity
StopReason = normal | shutdown | term()

If the configuration parameter {this, "Module::Interface"} is passed to IC and the function is defined to be one-way this function must be exported.

Module_Interface_impl:own_functions(State, Arg1, ..., ArgN) -> CallReply

Types:

State = term()
CallReply = {noreply, State} | {noreply, State, Timeout} | {stop, StopReason, State}
ArgX = specified in the IDL-code.
Reply = specified in the IDL-code.
Timeout = int() >= 0 | infinity
StopReason = normal | shutdown | term()

If the configuration parameter {this, "Module::Interface"} is not passed to IC and the function is defined to be one-way this function must be exported.

AUTHORS

Support - support@erlang.ericsson.se

orber 3.2.12
Copyright © 1991-2002 Ericsson Utvecklings AB