xrootd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
XrdSsiRRAgent.hh
Go to the documentation of this file.
1 #ifndef __XRDSSIRRAGENT_HH__
2 #define __XRDSSIRRAGENT_HH__
3 /******************************************************************************/
4 /* */
5 /* X r d S s i R R A g e n t . h h */
6 /* */
7 /* (c) 2017 by the Board of Trustees of the Leland Stanford, Jr., University */
8 /* Produced by Andrew Hanushevsky for Stanford University under contract */
9 /* DE-AC02-76-SFO0515 with the Department of Energy */
10 /* */
11 /* This file is part of the XRootD software suite. */
12 /* */
13 /* XRootD is free software: you can redistribute it and/or modify it under */
14 /* the terms of the GNU Lesser General Public License as published by the */
15 /* Free Software Foundation, either version 3 of the License, or (at your */
16 /* option) any later version. */
17 /* */
18 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */
19 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
20 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
21 /* License for more details. */
22 /* */
23 /* You should have received a copy of the GNU Lesser General Public License */
24 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
25 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
26 /* */
27 /* The copyright holder's institutional names and contributor's names may not */
28 /* be used to endorse or promote products derived from this software without */
29 /* specific prior written permission of the institution or contributor. */
30 /******************************************************************************/
31 
32 #include "XrdSsi/XrdSsiRequest.hh"
34 
35 class XrdSsiMuex;
36 
38 {
39 public:
40 
41 static void Alert(XrdSsiRequest &reqR, XrdSsiRespInfoMsg &aMsg)
42  {reqR.Alert(aMsg);}
43 
44 static void CleanUp(XrdSsiRequest &reqR) {reqR.CleanUp();}
45 
46 static void Dispose(XrdSsiRequest &reqR) {reqR.Dispose();}
47 
48 static XrdSsiErrInfo &ErrInfoRef(XrdSsiRequest *rP) {return rP->errInfo;}
49 
50 static void onServer(XrdSsiRequest *rP) {rP->onClient = false;}
51 
52 static XrdSsiRequest *Request(XrdSsiResponder *rP) {return rP->reqP;}
53 
54 static XrdSsiRespInfo *RespP(XrdSsiRequest *rP) {return &(rP->Resp);}
55 
56 static void SetNode(XrdSsiRequest *rP, const char *name)
57  {rP->epNode = name;}
58 
60  {rP->spMutex.Lock();
61  rP->reqP = 0;
62  rP->spMutex.UnLock();
63  }
64 
65 static void SetMutex(XrdSsiRequest *rP, XrdSsiMutex *mP)
66  {rP->rrMutex = mP;}
67 };
68 #endif
void Lock()
Definition: XrdSsiAtomics.hh:116
Definition: XrdSsiAtomics.hh:110
Definition: XrdSsiRespInfo.hh:43
static XrdSsiErrInfo & ErrInfoRef(XrdSsiRequest *rP)
Definition: XrdSsiRRAgent.hh:48
Definition: XrdSsiResponder.hh:68
XrdSsiRespInfo Resp
Definition: XrdSsiRequest.hh:355
static void SetMutex(XrdSsiRequest *rP, XrdSsiMutex *mP)
Definition: XrdSsiRRAgent.hh:65
XrdSsiMutex * rrMutex
Definition: XrdSsiRequest.hh:353
Definition: XrdSsiRespInfo.hh:86
static void ResetResponder(XrdSsiResponder *rP)
Definition: XrdSsiRRAgent.hh:59
static XrdSsiRequest * Request(XrdSsiResponder *rP)
Definition: XrdSsiRRAgent.hh:52
static void Dispose(XrdSsiRequest &reqR)
Definition: XrdSsiRRAgent.hh:46
static void Alert(XrdSsiRequest &reqR, XrdSsiRespInfoMsg &aMsg)
Definition: XrdSsiRRAgent.hh:41
XrdSsiRequest * reqP
Definition: XrdSsiResponder.hh:262
static void SetNode(XrdSsiRequest *rP, const char *name)
Definition: XrdSsiRRAgent.hh:56
virtual void Alert(XrdSsiRespInfoMsg &aMsg)
Send or receive a server generated alert.
Definition: XrdSsiRequest.hh:295
bool onClient
Definition: XrdSsiRequest.hh:361
XrdSsiMutex spMutex
Definition: XrdSsiResponder.hh:261
XrdSsiErrInfo errInfo
Definition: XrdSsiRequest.hh:356
static void CleanUp(XrdSsiRequest &reqR)
Definition: XrdSsiRRAgent.hh:44
Definition: XrdSsiErrInfo.hh:40
Definition: XrdSsiRequest.hh:70
const char * epNode
Definition: XrdSsiRequest.hh:358
virtual void Dispose()
Definition: XrdSsiRequest.hh:350
static void onServer(XrdSsiRequest *rP)
Definition: XrdSsiRRAgent.hh:50
Definition: XrdSsiRRAgent.hh:37
static XrdSsiRespInfo * RespP(XrdSsiRequest *rP)
Definition: XrdSsiRRAgent.hh:54
void UnLock()
Definition: XrdSsiAtomics.hh:118