#include <XrdSsiService.hh>
◆ XrdSsiService()
XrdSsiService::XrdSsiService |
( |
| ) |
|
|
inline |
◆ ~XrdSsiService()
virtual XrdSsiService::~XrdSsiService |
( |
| ) |
|
|
inlineprotectedvirtual |
Destructor. The service object cannot be explicitly deleted. Use Stop().
◆ Attach()
Attach to a backgrounded request.
When a client calls Attach() the server-side Attach() is invoked to indicate that the backgrounded request is now a foreground request. Many times such notification is not needed so a default nil implementation is provided. Server-side Attach() calls are always passed the original request object reference so that it can pair up the request with the attach.
- Parameters
-
eInfo | Reference to an error info object which will contain the error describing why the attach failed (i.e. return false). |
handle | Reference to the handle provided to the callback method XrdSsiRequest::ProcessResponse() via isHandle response type. This is always an empty string on server-side calls. |
reqRef | Reference to the request object that is to attach to the backgrounded request. It need not be the original request object (client-side) but it always is the original request object server-side. |
resP | A pointer to the resource object describing the request resources. This is meaningless for client calls and should not be specified. For server-side calls, it can be used to reauthorize the request since the client performing the attach may be different from the client that actually started the request. |
- Returns
- true Continue normally, no issues detected. false An exception occurred, the eInfo object has the reason. For server side calls this provides the service the ability to reject request reattachment.
◆ GetVersion()
int XrdSsiService::GetVersion |
( |
| ) |
|
|
inline |
◆ Prepare()
Prepare for processing subsequent resource request.
This method is meant to be used server-side to optimize subsequent request processing, perform authorization, and allow a service to stall or redirect requests. It is optional and a default implementation is provided that simply asks the provider if the resource exists on the server. Clients need not call or implement this method.
- Parameters
-
eInfo | The object where error information is to be placed. |
rDesc | Reference to the resource object that describes the resource subsequent requests will use. |
- Returns
- true Continue normally, no issues detected. false An exception occurred, the eInfo object has the reason.
Special notes for server-side processing:
1) Two special errors are recognized that allow for a client retry:
resP->eInfo.eNum = EAGAIN (client should retry elsewhere) resP->eInfo.eMsg = the host name where the client is redirected resP->eInfo.eArg = the port number to be used by the client
resP->eInfo.eNum = EBUSY (client should wait and then retry). resP->eInfo.eMsg = an optional reason for the wait. resP->eInfo.eArg = the number of seconds the client should wait.
◆ ProcessRequest()
Process a request; client-side or server-side.
When a client calls ProcessRequest() the same method is called server-side with the same parameters that the client specified except for timeOut which is always set to zero server-side.
- Parameters
-
reqRef | Reference to the Request object that describes the request. |
resRef | Reference to the Resource object that describes the resource that the request will be using. |
All results are returned via the request object callback methods. For background queries, the XrdSsiRequest::ProcessResponse() is called with a response type of isHandle when the request is handed off to the endpoint for execution (see XrdSsiRequest::SetDetachTTL).
Implemented in XrdSsiServReal.
◆ Stop()
virtual bool XrdSsiService::Stop |
( |
bool |
immed = false | ) |
|
|
inlinevirtual |
Stop the client-side service. This is never called server-side.
- Parameters
-
immed | When true, the service is only stopped if here are no active requests. Otherwise, after all requests have finished. the service object is deleted. |
- Returns
- true Service has been stopped. Once all requests have been completed, the service object will be deleted.
-
false Service cannot be stopped because there are still active foreground requests and the immed parameter was true.
Reimplemented in XrdSsiServReal.
◆ SsiVersion
const int XrdSsiService::SsiVersion = 0x00020000 |
|
static |
Obtain the version of the abstract class used by underlying implementation. The version returned must match the version compiled in the loading library. If it does not, initialization fails.
Referenced by GetVersion().
The documentation for this class was generated from the following file: