Hi,

Regarding the proposed extension of the cancel feature to all network requests 
I would like to share some thoughts:

  *   Most network requests are nested but none are running in parallel. This 
means that at a time only one request is active and there should be no need for 
an array of cancelable requests.
  *   When a request is cancelled, it invokes the completion handler with a 
CMISErrorCodeCancelled error which should percolate up the call stack and 
prevent any further network requests, so again just one network request needs 
to be cancelled in order to cancel a CMIS request no matter how deeply it is 
nested.
  *   It would be very useful to be able to cancel requests on the CMISSession, 
especially the connect. Use case is that a user explicitly triggers a 
(re)connect, e.g. after tuning the session parameters, while a current connect 
request is still running; in this case you would like to cancel the running 
request and perform a connect with the new parameters.

Regards
Peter

From: Peter Schmidt 
<[email protected]<mailto:[email protected]>>
Reply-To: 
"[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Date: Freitag, 15. Februar 2013 16:35
To: Apache Chemistry <[email protected]<mailto:[email protected]>>
Cc: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: [objective-cmis] Proposal for changes in the ObjectiveCMIS library

Hi all,

prior to our next developer meeting I wanted to give you a heads up of further 
change proposals to the ObjectiveCMIS library.

Before doing that let's recapitulate the changes submitted to SVN so far:

  1.  CMISNetworkProvider interface to override the default network request 
handling in the library with a custom network API. As a part of that the 
CMISHttpUtil.m (HttpUtil class) has been renamed to CMISDefaultNetworkProvider 
and the invoke methods have been changed to instance instead of class methods.
  2.  Refactor some of the method signatures to reflect Apple's code guidance. 
E.g. withHttpMethod has been renamed to httpMethod.

Here is the list of further proposed:

  *   All network requests are cancellable.
     *   For that all invoke<XXX> methods to take a CMISRequest object. For 
clarity the parameter has been renamed from requestObject to cmisRequest
     *   Typically network requests in the CMIS lib are nested calls. 
Therefore, the CMISRequest class now has an internal array to which newly 
created requests are added.
     *   The CMISRequest.h file also defines a CMISCancellableRequest protocol 
with a defined method - (void)cancel in it. Classes such as CMISHttpRequest 
will implement this protocol. CMISRequest will only add a new cancellable 
request to it, if the class conforms to the CMISCancellableRequest protocol.
     *   Most methods in CMISSession, CMISDocument, CMISFolder return a 
CMISRequest object. Exceptions are when creating a CMISSession 
(authenticate/connect). It might be a bit overkill to make that cancellable, 
too.
     *   When a cancel request is issued: all requests in the array in 
CMISRequest will be cancelled - going all the way down the nested request 
structure if need be
  *   changeContentToContentOfFile/OfInputStream methods: we found it is 
necessary to pass in a mimeType as well. The rationale is, that the mimeType 
cannot be deduced from the filename in all circumstances - in which case it may 
default to the wrong type.
  *   further clean-up of methods and ordering of names. E.g. 
includeRelationShips was renamed to relationships (include... is used for BOOL 
values).

--
Kind regards
Peter

-----------
Peter Schmidt
Alfresco Software Ltd.
UK: 07748 185496
Int.: 0044 7748 185496<tel:7748%20185496>
Skype: pweschmidt

--
You received this message because you are subscribed to the Google Groups 
"Objective-CMIS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To post to this group, send an email to 
[email protected]<mailto:[email protected]>.
Visit this group at http://groups.google.com/group/objective-cmis?hl=en-GB.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to