com.sun.im.service
Interface NewsService


public interface NewsService

The NewsService


Method Summary
 NewsChannel getNewsChannel(java.lang.String destination, NewsChannelListener listener)
          retrieve and subscribe to a bulletin board.
 java.util.Collection getSubscribedNewsChannels()
          get all bulletin boards to which the user has a subsription
 java.util.Collection listNewsChannels()
          list all available bulletin boards
 java.util.Collection listNewsChannels(int access)
          list all available bulletin boards to which the user has the given access
 NewsChannel newNewsChannel(java.lang.String destination, NewsChannelListener listener, int defaultAccess)
          create a new bulletin board.
 

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()
                                      throws CollaborationException
list all available bulletin boards

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

listNewsChannels

public java.util.Collection listNewsChannels(int access)
                                      throws CollaborationException
list all available bulletin boards to which the user has the given access

Parameters:
access - privilege user has to the bulletin board
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

getSubscribedNewsChannels

public java.util.Collection getSubscribedNewsChannels()
                                               throws CollaborationException
get all bulletin boards to which the user has a subsription

Returns:
a collection of bulletin board objects.
Throws:
CollaborationException