The standard mechanism for attaching external processes to a FARGOS/VISTA Object Management Environment.
More...
|
| OMEapi (const OMEassoc &acl, const char *dest) NONNULL_CLASS_PARAMETERS(3) |
|
| OMEapi (const OMEassoc &acl, const OMEstring &dest) |
|
| ~OMEapi () |
|
int | establishConnection (OMEtype &authentication) |
|
int | invokeMethod (const OMEtype &dest, const OMEtype &methodName, const OMEtype &args, const OMEtype *fromObj=nullptr, const OMEassoc *context=nullptr) |
|
int | importInvocation (OMEtype &methodName, OMEtype &argv, OMEtype *fromObj=nullptr, OMEtype *destObj=nullptr, OMEtype *context=nullptr, OMEtype *user=nullptr) |
| Receives a message from a remote object that is accessible via the set of interconnected FARGOS/VISTA Object Management Environment peers. More...
|
|
void | setContext (const OMEassoc &env) |
|
void | setUserInfo () |
|
int | getPeerObject (OMEtype &obj) |
|
int | getThisObject (OMEtype &obj) |
|
OMEioDescriptor * | getDescriptor () const |
|
int | getHandle () const |
|
The standard mechanism for attaching external processes to a FARGOS/VISTA Object Management Environment.
New or pre-existing applications can access and be integrated into a FARGOS/VISTA Object Management Environment using the OMEapi.
Receives a message from a remote object that is accessible via the set of interconnected FARGOS/VISTA Object Management Environment peers.
- Parameters
-
methodName | identifies the name of the method which is to be invoked. |
argv | is an array of arguments for the method. The first argument, if any, starts at subscript 0. The OMEtype::indexExists() function can be used to determine if an argument is present. |
fromObj | is an optional argument. If provided, the object id of the sender will be saved; otherwise, this information will be discarded. |
destObj | is an optional argument. If provided, the object Id of the intended target will be saved; otherwise, this information will be discarded. Usually, destObj will be identical to that returned by getThisObject(); however, since it is possible to have a given OMEapi() connection maintain access to multiple objects, some applications will need this information to select a specific object. |
context | is an optional associative array that enables a specific thread context to be set for the method invocation. If not provided, the default context (set by setContext() ) is used. |
user | is an optional argument. If provided, information about the identity of the user requesting the operation will be stored. |
- Return values
-
-1 | is returned on error. |
0 | indicates success. |
References ARGV_SUBSCRIPT, conn, CONTEXT_SUBSCRIPT, OMEdebugEvents, OMEdebugFlag, OMEdebugMethodInvocations, OMEconnection::receiveMessage(), and USERINFO_SUBSCRIPT.
Sends a message to a remote object that is accessible via the set of interconnected FARGOS/VISTA Object Management Environment peers.
- Parameters
-
dest | identifies the target of the message. Usually this is an object Id, but it can be a string name that identifies a named service. Name services are resolved to object Ids by the connected FARGOS/VISTA Object Management Environment. |
methodName | identifies the name of the method to be invoked. |
args | is an array of arguments for the method. The first argument, if any, starts at subscript 0. The count of the number of arguments is performed automatically, so there is no need nor provision for providing this information. |
fromObj | is an optional argument, which defaults to the object Id assigned to this instance of the OMEapi (which can be retrieved by getThisObject() ). |
context | is an optional associative array that enables a specific thread context to be set for the method invocation. If not provided, the default context (set by setContext() ) is used. |
- Return values
-
-1 | is returned on error. |
0 | indicates success. |
References ARGV_SUBSCRIPT, conn, CONTEXT_SUBSCRIPT, defaultContext, FORWARD_CMD, OME_ARRAY, OME_NIL, OMEdebugFlag, OMEdebugMethodInvocations, OMEconnection::sendMessage(), thisObject, OMEtype::type, userInfo, and USERINFO_SUBSCRIPT.