James Mason schrieb:
Yes, you can specify the repository host/port and the local udp listener port in the constructor.Based on my reading of the NotificationListener source this is the sequence that needs to happen (Client and server are both Slide servers in this case):
1. Client creates a NotificationListener
2. Client subscribes to server with a Subscriber and receives aThe interval for polling can be specified in constructor. If set to a very large interval, poll is more or disabled.
subsription id
3a. Client periodically POLLs server for update events for all
subscription ids
ANDYou should in the end be able to simple register a subscriber and get called when the method you are listening for occurs. You also get the event specific information set by the RemoteInformation interface on server side in a simple map.
3b. Server sends NOTIFY request with a list of subscription ids
to client when a resource is updated
3c. Client POLLs server to get a list of update events for the
notified subscription ids
4. Server returns list of update events for the specified subscription
ids
5. Client calls notify() on the Subscriber registered for each received
update event
6. The subscriber fires a UrisModifiedEvent that is handled elsewhere toMy suggestion would be to use the event collection on server side and throw the UrisModifiedEvent on server side with all changed uris specified in the RemoteInformation way.
uncache the Uris.
So you should lateron be able to register for the UrisModifiedEvent on client side and get notified when any Uris change on server side and get the Uris in the information map at once.
At the moment the only way is to use the subscription lifetime and renew the subscription periodically. I'll have a look at making subscription persistent as this really seems to be needed if we want reliable event based cluster support...First off, does this sequence of event looks like I'm using NotificationListener properly?
Second, I'm concerned about the possibility of subscriptions being
dropped if a server goes down. In this scenario if the server where to
restart and lose the subscription id the client would no longer be able
receive events. Is there support for persistent subscriptions on the
server or perhaps a way to notify the client that the subscription was
lost so it can resubscribe?
Regarfds,
Daniel
-James
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
