ATLAS Offline Software
ONCRPCServerThreads.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef JIVEXML_ONCRPCSERVERPROC_H
6 #define JIVEXML_ONCRPCSERVERPROC_H
7 
8 #include "JiveXML/ONCRPCServer.h"
9 
10 namespace JiveXML{
11 
12  //Forward declarations
13  class IServer;
14  class ThreadCollection;
15 
16  //Global link to thread collection
18 
24  ServerThreadArguments_t(JiveXML::IServer* const serverPtr, const int portNumber, void (* const cleanupHandler)(void*)=NULL):
25  ServerPtr(serverPtr), PortNumber(portNumber), CleanUpHandler(cleanupHandler) {} //Constructor
26  JiveXML::IServer* const ServerPtr; //const pointer to the gaudi service
27  const int PortNumber; //port number to bind to
28  void (* const CleanUpHandler)(void*); //Cleanup handler to be run when the main thread exits
29  };
30 
34  void* ONCRPCServerThread( void* args );
35 
42  DispatchThreadArguments_t(JiveXML::IServer* const serverPtr, const svc_req* rqp, const Event* event, const EventRequest* req):
43  ServerSvcPtr(serverPtr),rqstp(rqp),evt(event),evtReq(req){} //Constructor
44  JiveXML::IServer* const ServerSvcPtr; //cannot modify pointer, only object
45  const struct svc_req* rqstp;
46  const Event* evt;
48  };
49 
53  void* ONCRPCDispatchThread( void* args );
54 
59  extern "C" void ONCRPCRequestHandler( struct svc_req* rqstp, SVCXPRT* transp);
60 
61 }
62 #endif
JiveXML::DispatchThreadArguments_t::rqstp
const struct svc_req * rqstp
Definition: ONCRPCServerThreads.h:45
JiveXML::DispatchThreadArguments_t::ServerSvcPtr
JiveXML::IServer *const ServerSvcPtr
Definition: ONCRPCServerThreads.h:44
JiveXML::ThreadCollection
This class handles a collection of threads.
Definition: ONCRPCThreadCollection.h:17
JiveXML::ONCRPCDispatchThread
void * ONCRPCDispatchThread(void *args)
This is the thread handling the request - one thread per request.
Definition: ONCRPCServerThreads.cxx:42
JiveXML::DispatchThreadArguments_t::evtReq
const EventRequest * evtReq
Definition: ONCRPCServerThreads.h:47
JiveXML::DispatchThreadArguments_t::DispatchThreadArguments_t
DispatchThreadArguments_t(JiveXML::IServer *const serverPtr, const svc_req *rqp, const Event *event, const EventRequest *req)
Definition: ONCRPCServerThreads.h:42
JiveXML::DispatchThreadArguments_t::evt
const Event * evt
Definition: ONCRPCServerThreads.h:46
JiveXML::ONCRPCRequestHandler
void ONCRPCRequestHandler(struct svc_req *rqstp, SVCXPRT *transp)
The Request handler is called from the RPC kernel routines - hence extern C It creates a new dispatch...
Definition: ONCRPCServerThreads.cxx:116
JiveXML::dispatchThreads
ThreadCollection *const dispatchThreads
Definition: ONCRPCServerThreads.cxx:31
ONCRPCServer.h
JiveXML::EventRequest_t
Definition: ONCRPCServer.h:58
JiveXML::ONCRPCServerThread
void * ONCRPCServerThread(void *args)
This is the actual server thread, which takes above arguments.
Definition: ONCRPCServerThreads.cxx:252
JiveXML::ServerThreadArguments_t::ServerThreadArguments_t
ServerThreadArguments_t(JiveXML::IServer *const serverPtr, const int portNumber, void(*const cleanupHandler)(void *)=NULL)
Definition: ONCRPCServerThreads.h:24
JiveXML::ServerThreadArguments_t
Definition: ONCRPCServerThreads.h:23
JiveXML::ServerThreadArguments_t::ServerPtr
JiveXML::IServer *const ServerPtr
Definition: ONCRPCServerThreads.h:26
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
JiveXML::ServerThreadArguments_t::CleanUpHandler
void(*const CleanUpHandler)(void *)
Definition: ONCRPCServerThreads.h:28
JiveXML
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
Definition: BadLArRetriever.cxx:22
JiveXML::DispatchThreadArguments_t
Definition: ONCRPCServerThreads.h:41
JiveXML::IServer
Pure abstract interface for all full server implementations.
Definition: IServer.h:22
JiveXML::ServerThreadArguments_t::PortNumber
const int PortNumber
Definition: ONCRPCServerThreads.h:27
JiveXML::Event_t
Definition: ONCRPCServer.h:66
python.CaloScaleNoiseConfig.args
args
Definition: CaloScaleNoiseConfig.py:80