Difference: ClientApiCppDoc (8 vs. 9)

Revision 92011-07-12 - AlviseDorigo

Line: 1 to 1
META TOPICPARENT name="DevelopersDocumentation"





Preliminaries: build machine configuration

Line: 179 to 179
  Example source code.

Enabling and disabling the Job Submission Service

Depending on the role of the user, she/he can enable/disable the job submission on a remote CREAM CE. The code is so simple that, as usual, the example speaks for itself. Relevant API documentation is clearly the factory method CramProxyFactory::make_CreamProxyAcceptNewJobSubmissions(...).

Renewing a Delegated Proxy

To register a job to a CREAM CE a client must first delegate a proxy to the CE and save an identifier string associated with this delegation; this identifier will be used to register jobs. But the proxy are not valid forever. At some point the delegated proxy must be renewed. The procedure is as simple as in the delegation case. The user has just to put the delegation identifier string into the factory method that creates the proper AbsCreamProxy subclass and invoke, as usual, setCredential(...) and execute(...). Taking a look at the example source code is the fastest way to understand this very simple procedure. Relevant API documentation is clearly the factory method CramProxyFactory::make_CreamProxy_ProxyRenew(...).

Querying job status events

QueryEvent is a convenient CREAM's operation that returns a selected range of particular events. At the moment in the CREAM framework an Event is a job's status change; in future an evolved version of CREAM could put different kind of information inside an event.

A user that invokes a QueryEvent on a CREAM CE, receives all her/his jobs's status changes. The query has two filters:

  • time range (from, to)
  • ID range (from ,to)
Time range has a quite intuitive meaning, the ID a few less. Each event generated in a CE for a certain user, has an incremental ID (64bit unsigned integer). A user can be interested to a certain events identified by a recent ID range that correspond to recent job status changes. This function is particularly useful to the ICE component that memorizes the last EventID received in the last call for each couple (user_DN, CE_URL), resulting in a quite small information exchange with the CE. As usual, in order to perform a QueryEvent the user must obtain a pointer to an AbsCreamProxy object by mean of CreamProxyFactory::make_CreamProxy_QueryEvent(...), invoke the execute(...) method on it, and delete. The invocation of execute will fill up the list of EventWrapper pointers (that is an argument of the CreamProxyFactory::make_CreamProxy_QueryEvent function).

-- AlviseDorigo - 2011-06-14

Line: 192 to 209
META FILEATTACHMENT attachment="tryList.cpp" attr="" comment="" date="1308558541" name="tryList.cpp" path="tryList.cpp" size="1280" user="AlviseDorigo" version="1"
META FILEATTACHMENT attachment="tryCancel.cpp" attr="" comment="" date="1308558541" name="tryCancel.cpp" path="tryCancel.cpp" size="4429" user="AlviseDorigo" version="1"
META FILEATTACHMENT attachment="tryMultipleRegister.cpp" attr="" comment="" date="1309956911" name="tryMultipleRegister.cpp" path="tryMultipleRegister.cpp" size="4762" user="AlviseDorigo" version="1"
META FILEATTACHMENT attachment="tryProxyRenew.cpp" attr="" comment="" date="1310458435" name="tryProxyRenew.cpp" path="tryProxyRenew.cpp" size="1188" user="AlviseDorigo" version="1"
META FILEATTACHMENT attachment="tryEnableDisableSub.cpp" attr="" comment="" date="1310459581" name="tryEnableDisableSub.cpp" path="tryEnableDisableSub.cpp" size="1037" user="AlviseDorigo" version="1"
This site is powered by the TWiki collaboration platformCopyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback