XRootD
PostError Class Reference
+ Inheritance diagram for PostError:
+ Collaboration diagram for PostError:

Public Member Functions

 PostError (XrdSsiRequest *rP, char *emsg, int ec)
 
virtual ~PostError ()
 
void DoIt ()
 
virtual void Finished (XrdSsiRequest &rqstR, const XrdSsiRespInfo &rInfo, bool cancel=false)
 
- Public Member Functions inherited from XrdJob
 XrdJob (const char *desc="")
 
virtual ~XrdJob ()
 
- Public Member Functions inherited from XrdSsiResponder
void BindRequest (XrdSsiRequest &rqstR)
 
bool UnBindRequest ()
 

Additional Inherited Members

- Public Attributes inherited from XrdJob
const char * Comment
 
XrdJobNextJob
 
- Static Public Attributes inherited from XrdSsiResponder
static const int MaxDirectXfr = 2097152
 
- Protected Types inherited from XrdSsiResponder
enum  Status {
  wasPosted =0 ,
  notPosted ,
  notActive
}
 
- Protected Member Functions inherited from XrdSsiResponder
 XrdSsiResponder ()
 
virtual ~XrdSsiResponder ()
 
void Alert (XrdSsiRespInfoMsg &aMsg)
 
char * GetRequest (int &dlen)
 
void ReleaseRequestBuffer ()
 
Status SetErrResponse (const char *eMsg, int eNum)
 
Status SetMetadata (const char *buff, int blen)
 
Status SetNilResponse ()
 
Status SetResponse (const char *buff, int blen)
 
Status SetResponse (long long fsize, int fdnum)
 
Status SetResponse (XrdSsiStream *strmP)
 
- Static Protected Attributes inherited from XrdSsiResponder
static const int MaxMetaDataSZ = 2097152
 2MB metadata limit More...
 

Detailed Description

Definition at line 70 of file XrdSsiUtils.cc.

Constructor & Destructor Documentation

◆ PostError()

PostError::PostError ( XrdSsiRequest rP,
char *  emsg,
int  ec 
)
inline

Definition at line 93 of file XrdSsiUtils.cc.

94  : myMutex(XrdSsiMutex::Recursive),
95  reqP(rP), eTxt(emsg), eNum(ec), isActive(true)
96  {XrdSsiRRAgent::SetMutex(rP, &myMutex);
97  BindRequest(*reqP);
98  }
int emsg(int rc, char *msg)
static void SetMutex(XrdSsiRequest *rP, XrdSsiMutex *mP)
void BindRequest(XrdSsiRequest &rqstR)

References XrdSsiRRAgent::SetMutex().

+ Here is the call graph for this function:

◆ ~PostError()

virtual PostError::~PostError ( )
inlinevirtual

Definition at line 100 of file XrdSsiUtils.cc.

100  {myMutex.UnLock();
101  if (eTxt) free(eTxt);
102  }

Member Function Documentation

◆ DoIt()

void PostError::DoIt ( )
inlinevirtual

Implements XrdJob.

Definition at line 74 of file XrdSsiUtils.cc.

74  {myMutex.Lock();
75  if ( isActive) SetErrResponse(eTxt, eNum);
76  if (!isActive) delete this;
77  else {isActive = false;
78  myMutex.UnLock();
79  }
80  }
Status SetErrResponse(const char *eMsg, int eNum)

◆ Finished()

virtual void PostError::Finished ( XrdSsiRequest rqstR,
const XrdSsiRespInfo rInfo,
bool  cancel = false 
)
inlinevirtual

Notify the responder that a request either completed or was canceled. This allows the responder to release any resources given to the request object (e.g. data response buffer or a stream). This method is invoked when XrdSsiRequest::Finished() is called by the client.

Parameters
rqstRreference to the object describing the request.
rInforeference to the object describing the response.
cancelFalse -> the request/response interaction completed. True -> the request/response interaction aborted because of an error or the client requested that the request be canceled.

Implements XrdSsiResponder.

Definition at line 82 of file XrdSsiUtils.cc.

85  {UnBindRequest();
86  myMutex.Lock();
87  if (!isActive) delete this;
88  else {isActive = false;
89  myMutex.UnLock();
90  }
91  }

The documentation for this class was generated from the following file: