On 6/13/06, Lixin Chu <[EMAIL PROTECTED]> wrote:
Hi Marco,
thanks for your info. some questions: the webdavResoruce has one method:
public Subscription
<http://jakarta.apache.org/slide/clientjavadoc/org/apache/webdav/lib/Subscription.html>
*subscribeMethod*(java.lang.String path,
java.lang.String notificationType,
java.lang.String callback,
long notificationDelay,
int depth,
long lifetime)
I suppose this is used to tell Slide that I am interested in the change made
to the 'path'. But I do not know how to register the Subscriber. and also
what do we have in the Map information ? the API doc does not tell us more
abt this though.
Actually, what I do is I create a listener and then add subscribers to
it so that I can get the callbacks ... I don't create subscriptions
but Subscriber(s)
One more question, does this subscribeMethod is valid for the current http
session ? I am developing a Struts+Spring based web application. The feature
is something like this:
user can subscribe to the changes made to the resources (files/folders)
when something happened, a notification msg is sent by Slide to my web
application; the web application then log necessary information, like who
and what action was done to the resource.
I use it as a process instantiated by the server ; it is a servlet
that runs in background, so I suppose yes
Does your solution work in this way:
- when we start the web application, we check a special folder in Slide to
get any existing subscritions, then webdavResource.subscribeMethod() one by
one with a long enough lifetime;
- when user wants to monitor a resource, the web application add the
request into the special folder, and also webdavResource.subscribeMethod()
it.
- when a notification arrives, the registered Subscriber class will get the
user list and send msg to all subscribers
Exactly .
thanks !
no probs .
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]