com.sun.im.service
Interface NotificationSession

All Superinterfaces:
CollaborationSession

public interface NotificationSession
extends CollaborationSession

A notification session is a context in which an authenticated user can use the Notification Service, that is send and receive messages. The Notification Service is distinct from the conference service, despite the fact that the same Message definition is used in both. The differences include

About Poll The poll feature is built on top of the notification service. It uses specific content types defined here. here.


Method Summary
 Message createMessage()
          create a message.
 Message createMessage(java.lang.String destination)
          create a message.
 void sendMessage(Message message, MessageStatusListener listener)
          send an alert to a destination.
 
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

sendMessage

public void sendMessage(Message message,
                        MessageStatusListener listener)
                 throws CollaborationException
send an alert to a destination. An alert is not sent in the context of a conference, as it does not allow for a response and does not require the destination to be online.

Parameters:
message - alert message
listener - callback object used by the provider to convey message disposition notifications.
Throws:
CollaborationException

createMessage

public Message createMessage(java.lang.String destination)
                      throws CollaborationException
create a message.

Parameters:
destination - address of the recipient. more recipient addresses can be added using the Message.addRecipient() method.
Throws:
CollaborationException

createMessage

public Message createMessage()
                      throws CollaborationException
create a message.

Throws:
CollaborationException