edmiRemoteWhoIsOn

EdmiError edmiRemoteWhoIsOn(SdaiUnsignedInt     serverContextId,
                             SdaiInteger       *numberOfConnections, 
                             SdaiWhoIsOnServer *pWhoIsOn,
                             SdaiInvocationId  *edmiInvocationId)

Returns all available information about the thick EDMclients that are connected to a remote EDMdatabase at the point of time for invocation of this function.

Arguments


TypeNameComment
SdaiUnsignedInt

serverContextId

Context identification, from edmiDefineServerContext

SdaiInteger

numberOfConnections

A variable that will receive the number of thick EDMclients that are connected to the remote  EDMdatabase

SdaiWhoIsOnServer

pWhoIsOn

A variable that will receive a pointer to a tEdmiWhoIsOnServer data structure. See the description of this data structure below.  The returned value will be a pointer to a static buffer in  EDMinterface. This buffer may be overwritten by successive  EDMinterface function calls. Hence, do not release this memory with edmiFree

SdaiInvocationId

edmiInvocationId

Currently not used.

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.

 

Options


  

 

Example


 

/* Close the model 'MyModel' on all
 the application servers running  
 on host 'tellus' */ 
 int i;
 EdmiError rstat;
 SdaiServerContext suContext;
 tEdmiWhoIsOnServer *pWhoIsOn;
 tEdmiConnection *connect;
 SdaiClientId appServer[128], *pAppServer = &appServer[0];
 SdaiInteger nConnect, nAppServer;
 SdaiString hostName, clientName;
  
 /* Define Remote Server Context
 for the superuser */ 
 rstat = edmiDefineServerContext("SuperUserContext",
 "superuser", NULL, "xfx56kl9",
 "TCP", "9090", "MyServerHost",
 NULL, NULL, NULL, NULL, NULL, &suContext); 
  
 /* Find the client ids of all application
 servers running on host tellus */ 
 rstat = edmiRemoteWhoIsOn(suContext, &nConnect, &pWhoIsOn, NULL);
 connect = pWhoIsOn->connections;
 nAppServer = 0;
 for (i=0;i<nConnect;i++) {
 rstat = edmiRemoteGetClientNames(suContext, connect->clientId,
 &hostName, &clientName, NULL); 
 if (strstr(clientName, "EDMapplicationServer-") && 
 strstr(clientName, " Main Client") && 
 ! strcmp(hostName, "tellus") ) { 
 rstat = edmiRemoteCloseModel(suContext, "MyRepository", "MyModel", 
 "xfx56kl9", connect->clientId, 0, NULL); 
 } 
 edmiFree(hostName); 
 edmiFree(clientName); 
 }

 

See also

Filter by label

There are no items with the selected labels at this time.

 


. . .