h开发者_JS百科ow to use the subscription-Method in "org.apache.webdav.lib.WebdavResource" ? In version 2.1 of the jakarta slide-Project there is a new Method "subscribeMethod". I can't find any examples for it. I want to get a notification, when a file on the WebDAV-Server has changed, deleted or is new. Is this possible with a subscription?
Currently I'm checking all files on the web-dav server, put them in some vectors and check them again every 5 seconds. But on a webdav-system with more than 150 folders and lots of files, it takes up to 5 minutes to scan all files and then comparing it with the old situation.
Is there a better and faster way to get the changes instantly?
Highly depends on the server your using. There's a WebDAV sync spec that solves your problem, but I'm not aware of any server implementations.
The most you can do with a 'plain' WebDAV server is fetch and compare the ETag with PROPFIND.
精彩评论