org.glassfish.cafe.api
Interface WatcherInfoSubscriber

All Superinterfaces:
UserProcedure

public interface WatcherInfoSubscriber
extends UserProcedure

The Presence WatcherInfo Subscriber is an entity that subscribes to the dynamically changing set of presence watchers. It concerns the watchers of one single presentity.

Presence WatcherInfo Subscriber is a UserProcedure. Each invocation of the update() method results in sending a SUBSCRIBE method in the network, subscribing to the watcher information for a specific presentity. The expiration time of the User procedure defines the period the subscription is active. The default expiration time is 3600 seconds. TODO check!!!

Events received after invoking the update() method indicate whether the subscription is accepted or not. If the subscription was accepted, a WatcherInfoMessage can be received containing watcher information changes for the presentity.

In order to limit the network load generated by the sending of notification messages it is possible to define an associated WatcherInfoSubscriberFilter in which both events and information to be included can be selected. The default filter set is empty. A newly defined filter set is included in a SUBSCRIBE method to the network if the update() method is invoked.

A special meaning is assigned to invoking the update() method with the expiration time set to a time in the past. If such a request is received by the remote side, it will send immediately a notification with the requested status and will terminate the procedure.

The Watcher Information Subscriber procedures are described in [RFC3265] and [RFC3857]. It supports the �application/watcherinfo+xml� content type, according to [RFC3858]. The WatcherInfoSubscriber event notification filtering procedures are described in [RFC4660].


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.glassfish.cafe.api.UserProcedure
UserProcedure.State
 
Method Summary
 void createFilter()
          Creates a filter for this WatcherInfoSubscriber.
 WatcherInfoSubscriberFilter getFilter()
          Returns the filter for this WatcherInfoSubscriber.
 String getUserId()
          Returns the user ID of the user that initiated this subscription and whose watchers' state changes are reported.
 void removeFilter()
          Removes the filter for this WatcherInfoSubscriber.
 
Methods inherited from interface org.glassfish.cafe.api.UserProcedure
addAgent, end, getAgent, getAgents, getExpirationTime, getMessage, getState, removeAgent, setExpirationTime, update
 

Method Detail

createFilter

void createFilter()
Creates a filter for this WatcherInfoSubscriber.


getFilter

WatcherInfoSubscriberFilter getFilter()
Returns the filter for this WatcherInfoSubscriber.

Returns:
the subscriber's Filter

removeFilter

void removeFilter()
Removes the filter for this WatcherInfoSubscriber.


getUserId

String getUserId()
Returns the user ID of the user that initiated this subscription and whose watchers' state changes are reported.

Specified by:
getUserId in interface UserProcedure
Returns:
the URI this subscription was created with.


Copyright © 2010. All Rights Reserved.