public void subscriptionStateChanged( Subscription subscription, Subscription.State previousState, Subscription.State newState) { WatcherResource resource = get(subscription.getResource().getUri()); try { resource.subscriptionStateChanged(subscription, previousState, newState); } finally { put(resource); } }
protected WatcherResource newResource(String uri) { Presentity presentity = _presenceEventPackage.get(uri); try { WatcherResource watcherResource = new WatcherResource(uri, presentity); watcherResource.addListener(getEventNotifier()); return watcherResource; } finally { _presenceEventPackage.put(presentity); } }