Bull DPX/20 Guia do Utilizador Página 303

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 424
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 302
2-135
DSOM Framework Reference
execute_next_request Method
Purpose
Receive a request message, execute the request, and return to the caller.
IDL Syntax
ORBStatus execute_next_request (
in Flags waitFlag );
Description
The execute_next_request method receives the next request message, executes the
request, and sends the result to the caller.
If the servers ImplementationDef indicates the server is multi-threaded (the impl_flags
has the IMPLDEF_MULTI_THREAD flag set), each request will be run by SOMOA in a
separate thread.
Parameters
receiver A pointer to the SOMOA object managing the implementation.
env A pointer to the Environment structure for the method caller.
waitFlag A Flags value (unsigned long) indicating whether the method should block
if there is no message pending (SOMD_WAIT) or return with an error
(SOMD_NO_WAIT).
Return Value
The execute_next_request method returns an ORBStatus value representing the return
value for the operation. SOMDERROR_NoMessages is returned if the method is invoked
with SOMD_NO_WAIT and no message is available.
Example
#include <somd.h>
/* server initialization code ... */
SOM_InitEnvironment(&ev);
/* signal DSOM that server is ready */
_impl_is_ready(SOMD_SOMOAObject, &ev, SOMD_ImplDefObject);
while (ev._major == NO_EXCEPTION) {
(void) _execute_next_request(SOMD_SOMOAObject,&ev,SOMD_WAIT);
/* perform appl–specific code between messages here, e.g.,*/
numMessagesProcessed++;
}
Original Class
SOMOA
Related Information
Methods: execute_request_loop
Vista de página 302
1 2 ... 298 299 300 301 302 303 304 305 306 307 308 ... 423 424

Comentários a estes Manuais

Sem comentários