Bull DPX/20 Guia do Utilizador Página 293

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 424
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 292
2-125
DSOM Framework Reference
somdListServer Method
Purpose
Queries the state of a server process.
IDL Syntax
ORBStatus somdListServer (in string server_alias);
Description
The somdListServer method is invoked to query the status of the server process
associated with the server alias. If the server process is running, the return code will be 0
indicating success. Status codes of SOMDERROR_ServerDisabled or
SOMDERROR_ServerNotFound may also be returned. The former return code indicates
that the server process has been disabled (refer somdDisableServer) and the latter
indicates that the server process is not currently running.
Parameters
receiver A pointer to an object of class SOMDServerMgr.
ev A pointer to the Environment structure for the calling method.
server_alias The implementation alias of the server to be listed.
Return Value
Returns 0 if the server process is running; otherwise, a DSOM error code is returned.
Example
#include <somd.h>
#include <servmgr.h>
SOMDServerMgr servmgr;
string server_alias = ”MyServer”;
ORBStatus rc;
Environment e;
SOM_InitEnvironment(&e);
SOMD_Init(&e);
servmgr = SOMDServerMgrNew();
rc = _somdListServer(servmgr, &e, server_alias);
if (!rc) /* server is running */
rc = _somdShutdownServer(servmgr, &e, server_alias);
else if (rc == SOMDERROR_ServerNotFound)
/* server is not running */
rc = _somdStartServer(servmgr, &e, server_alias);
Original Class
SOMDServerMgr
Vista de página 292
1 2 ... 288 289 290 291 292 293 294 295 296 297 298 ... 423 424

Comentários a estes Manuais

Sem comentários