XrdSsiService Class Reference

#include <XrdSsiService.hh>

Inheritance diagram for XrdSsiService:
Inheritance graph
[legend]

List of all members.

Public Member Functions

int GetVersion ()
virtual bool Attach (XrdSsiErrInfo &eInfo, const std::string &handle, XrdSsiRequest &reqRef, XrdSsiResource *resP=0)
 Attach to a backgrounded request.
virtual bool Prepare (XrdSsiErrInfo &eInfo, const XrdSsiResource &rDesc)
 Prepare for processing subsequent resource request.
virtual void ProcessRequest (XrdSsiRequest &reqRef, XrdSsiResource &resRef)=0
 Process a request; client-side or server-side.
virtual bool Stop ()
 Stop the client-side service. This is never called server-side.
 XrdSsiService ()
 Constructor.

Static Public Attributes

static const int SsiVersion = 0x00020000

Protected Member Functions

virtual ~XrdSsiService ()
 Destructor. The service object cannot be explicitly deleted. Use Stop().

Constructor & Destructor Documentation

XrdSsiService::XrdSsiService (  )  [inline]

Constructor.

virtual XrdSsiService::~XrdSsiService (  )  [inline, protected, virtual]

Destructor. The service object cannot be explicitly deleted. Use Stop().


Member Function Documentation

virtual bool XrdSsiService::Attach ( XrdSsiErrInfo eInfo,
const std::string &  handle,
XrdSsiRequest reqRef,
XrdSsiResource resP = 0 
) [inline, virtual]

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.
int XrdSsiService::GetVersion (  )  [inline]

References SsiVersion.

virtual bool XrdSsiService::Prepare ( XrdSsiErrInfo eInfo,
const XrdSsiResource rDesc 
) [virtual]

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.

virtual void XrdSsiService::ProcessRequest ( XrdSsiRequest reqRef,
XrdSsiResource resRef 
) [pure virtual]

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.
Returns:
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.

virtual bool XrdSsiService::Stop (  )  [inline, virtual]

Stop the client-side service. This is never called server-side.

Returns:
true Service has been stopped and this object has been deleted.
false Service cannot be stopped because there are still active foreground requests. Cancel the requests then call Stop().

Reimplemented in XrdSsiServReal.


Member Data Documentation

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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 21 May 2020 for xrootd by  doxygen 1.6.1