#include <XrdSsiResponder.hh>
◆ Status
The following enums are returned by SetMetadata() and SetResponse() to indicate ending status.
Enumerator |
---|
wasPosted | Success: The response was successfully posted.
|
notPosted | Failure: A request was not bound to this object or a response has already been posted or the metadata length was invalid
|
notActive | Failure: Request is no longer active.
|
◆ XrdSsiResponder()
XrdSsiResponder::XrdSsiResponder |
( |
| ) |
|
|
protected |
This class is meant to be inherited by an object that will actually posts responses.
◆ ~XrdSsiResponder()
virtual XrdSsiResponder::~XrdSsiResponder |
( |
| ) |
|
|
protectedvirtual |
Destructor is protected. You cannot use delete on a responder object, as it is meant to be inherited by a class and not separately instantiated.
◆ Alert()
Send an alert message to the request. This is a convenience method that avoids race conditions with Finished() so it is safe to use in all cases. This is a server-side call. The service is responsible for creating a RespInfoMsg object containing the message and supplying a RecycleMsg() method.
- Parameters
-
aMsg | reference to the message to be sent. |
◆ BindRequest()
Take ownership of a request object by binding the request object to a responder object. This method must be called by the responder before posting any responses.
- Parameters
-
rqstR | reference to the request object. |
◆ Finished()
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
-
rqstR | reference to the object describing the request. |
rInfo | reference to the object describing the response. |
cancel | False -> the request/response interaction completed. True -> the request/response interaction aborted because of an error or the client requested that the request be canceled. |
Implemented in XrdSsiTaskReal.
◆ GetRequest()
char * XrdSsiResponder::GetRequest |
( |
int & |
dlen | ) |
|
|
protected |
Obtain the request data sent by a client.
Note: This method is called with the object's recursive mutex unlocked!
- Parameters
-
dlen | holds the length of the request after the call. |
- Returns
- =0 No request data available, dlen has been set to zero.
-
!0 Pointer to the buffer holding the request, dlen has the length
◆ ReleaseRequestBuffer()
void XrdSsiResponder::ReleaseRequestBuffer |
( |
| ) |
|
|
protected |
Release the request buffer of the request bound to this object. This method duplicates the protected method of the same name in XrdSsiRequest and exists here for calling safety and consistency relative to the responder.
◆ SetErrResponse()
Status XrdSsiResponder::SetErrResponse |
( |
const char * |
eMsg, |
|
|
int |
eNum |
|
) |
| |
|
protected |
Set an error response for a request.
- Parameters
-
eMsg | the message describing the error. The message is copied to private storage. |
eNum | the errno associated with the error. |
- Returns
- See Status enum for possible values.
◆ SetMetadata()
Status XrdSsiResponder::SetMetadata |
( |
const char * |
buff, |
|
|
int |
blen |
|
) |
| |
|
protected |
◆ SetNilResponse()
Status XrdSsiResponder::SetNilResponse |
( |
| ) |
|
|
inlineprotected |
Set a nil response for a request (used for sending only metadata).
- Returns
- See Status enum for possible values.
References SetResponse().
◆ SetResponse() [1/3]
Status XrdSsiResponder::SetResponse |
( |
const char * |
buff, |
|
|
int |
blen |
|
) |
| |
|
protected |
Set a memory buffer containing data as the request response.
- Parameters
-
buff | pointer to a buffer holding the response. The buffer must remain valid until XrdSsiResponder::Finished() is called. |
blen | the length of the response in buff that is to be sent. |
- Returns
- See Status enum for possible values.
Referenced by SetNilResponse().
◆ SetResponse() [2/3]
Status XrdSsiResponder::SetResponse |
( |
long long |
fsize, |
|
|
int |
fdnum |
|
) |
| |
|
protected |
Set a file containing data as the response.
- Parameters
-
fsize | the size of the file containing the response. |
fdnum | the file descriptor of the open file. |
- Returns
- See Status enum for possible values.
◆ SetResponse() [3/3]
Set a stream object that is to provide data as the response.
- Parameters
-
strmP | pointer to stream object that is to be used to supply response data. See XrdSsiStream for more details. |
- Returns
- See Status enum for possible values.
◆ UnBindRequest()
bool XrdSsiResponder::UnBindRequest |
( |
| ) |
|
Unbind this responder from the request object it is bound to. Upon return ownership of the associated request object reverts back to the creator of the object who is responsible for deleting or recycling the request object. UnBindRequest() is also called when the responder object is deleted.
- Returns
- true Request successfully unbound. false UnBindRequest already called or called prior to Finish().
◆ XrdSsiRequest
◆ XrdSsiRRAgent
◆ MaxDirectXfr
const int XrdSsiResponder::MaxDirectXfr = 2097152 |
|
static |
The maximum amount of metadata+data (i.e. the sum of two blen arguments in SetMetadata() and and SetResponse(const char *buff, int blen), respectively) that may be directly sent to the client without the SSI framework converting the data buffer response into a stream response.
◆ MaxMetaDataSZ
const int XrdSsiResponder::MaxMetaDataSZ = 2097152 |
|
staticprotected |
2MB metadata limit
Set a pointer to metadata to be sent out-of-band ahead of the response.
- Parameters
-
buff | pointer to a buffer holding the metadata. The buffer must remain valid until XrdSsiResponder::Finished() is called. |
blen | the length of the metadata in buff that is to be sent. It must in the range 0 <= blen <= MaxMetaDataSZ. |
- Returns
- See Status enum for possible values.
◆ reqP
◆ rsvd1
long long XrdSsiResponder::rsvd1 |
|
private |
◆ rsvd2
long long XrdSsiResponder::rsvd2 |
|
private |
◆ rsvd3
long long XrdSsiResponder::rsvd3 |
|
private |
◆ spMutex
The documentation for this class was generated from the following file: