com.sun.im.service
Interface NewsSession

All Superinterfaces:
CollaborationSession

public interface NewsSession
extends CollaborationSession


Method Summary
 NewsChannel getNewsChannel(java.lang.String destination, NewsChannelListener listener)
          retrieve and subscribe to a bulletin board.
 java.util.Collection listNewsChannels(java.lang.String domain)
          list all available bulletin boards
 NewsChannel newNewsChannel(java.lang.String destination, NewsChannelListener listener, int defaultAccess)
          create a new bulletin board.
 
Methods inherited from interface com.sun.im.service.CollaborationSession
accessService, addPrivacyList, addSessionListener, changePassword, createPrincipal, createPrincipal, createPrivacyList, getActivePrivacyListName, getConferenceService, getDefaultPrivacyListName, getNewsService, getNotificationService, getPersonalStoreService, getPresenceService, getPrincipal, getPrivacyList, getStreamingService, listPrivacyLists, logout, removePrivacyList, removeSessionListener, setActivePrivacyListName, setDefaultPrivacyListName, setSessionListener, unregister
 

Method Detail

getNewsChannel

public NewsChannel getNewsChannel(java.lang.String destination,
                                  NewsChannelListener listener)
                           throws CollaborationException
retrieve and subscribe to a bulletin board.

Parameters:
destination - address of the bulletin board
listener - callback object by wich new messages are provided.
Returns:
a NewsChannel object materializing a connection to the specified bulltin board.
Throws:
CollaborationException

newNewsChannel

public NewsChannel newNewsChannel(java.lang.String destination,
                                  NewsChannelListener listener,
                                  int defaultAccess)
                           throws CollaborationException
create a new bulletin board.

Parameters:
destination - address of the bulletin board
defaultAccess - default privilege of new subscribers.
listener - callback object by wich new messages are provided.
Returns:
a NewsChannel object materializing a connection to the specified bulltin board.
Throws:
CollaborationException

listNewsChannels

public java.util.Collection listNewsChannels(java.lang.String domain)
                                      throws CollaborationException
list all available bulletin boards

Parameters:
domain - name of the domain in which to search.
Returns:
a collection of bulletin board objects. Note that no subbscription is attached to these bulletin boards by virtue of being returned in this list. Bulletin board subscriptions can be made by calling subscribe on elements in the collection.
Throws:
CollaborationException