com.sun.im.service
Interface CollaborationSession

All Known Subinterfaces:
ConferenceSession, NewsSession, NotificationSession, PersonalStoreSession, PresenceSession

public interface CollaborationSession

Authenticated instant communication session. It can be used to establish communication with another user or more than one user, join a conference, or establish subscriptions to instant bulletin boards.


Method Summary
 CollaborationSession accessService(java.lang.String service)
          Deprecated. use getNameService instead.
 void addPrivacyList(PrivacyList list)
          Adds the privacy list.
 void addSessionListener(CollaborationSessionListener listener)
          Adds the listener for the current session.
 void changePassword(java.lang.String password, RegistrationListener listener)
          changes the password of the authenticated principal
 CollaborationPrincipal createPrincipal(java.lang.String uid)
          create a principal object based on a fully-qualified user id
 CollaborationPrincipal createPrincipal(java.lang.String uid, java.lang.String displayName)
          create a principal object based on a fully-qualified user id
 PrivacyList createPrivacyList(java.lang.String name)
          Creates a PrivacyList object.
 java.lang.String getActivePrivacyListName()
          gets this users active privacy list
 ConferenceService getConferenceService()
          Get the ConferenceService associated with this Session.
 java.lang.String getDefaultPrivacyListName()
          gets this users default privacy list
 org.netbeans.lib.collab.MediaService getMediaService()
           
 NewsService getNewsService()
          Get the NewsService associated with this Session.
 NotificationService getNotificationService()
          Get the NotificationService associated with this session.
 PersonalStoreService getPersonalStoreService()
          Get the PersonalStoreService associated with this Session.
 PresenceService getPresenceService()
          Get the PresenceService associated with this Session.
 CollaborationPrincipal getPrincipal()
          get the Principal object for the current session
 PrivacyList getPrivacyList(java.lang.String name)
           
 StreamingService getStreamingService()
          Get the StreamingService associated with this Session.
 java.util.List listPrivacyLists()
          lists the name of the privacy lists Each Element in the List is a string
 void logout()
          terminate the session
 void removePrivacyList(java.lang.String name)
          remove the named PrivacyList.
 void removeSessionListener(CollaborationSessionListener listener)
          Removes the listener for the current session.
 void setActivePrivacyListName(java.lang.String name)
          set this privacy list as active.
 void setDefaultPrivacyListName(java.lang.String name)
          sets this users default privacy list
 void setSessionListener(CollaborationSessionListener listener)
          Deprecated. Use addSessionListener(CollaborationSessionListener)
 void unregister(RegistrationListener listener)
          unregister the authenticated principal
 

Method Detail

accessService

public CollaborationSession accessService(java.lang.String service)
                                   throws CollaborationException
Deprecated. use getNameService instead.

access a service. Note that an appropriate listener must be set prior invoking the service. This can be done while creating the session, or later by calling the setCollaborationSessionListener method.

Parameters:
service - indicates which service to access. Values are defined in the CollaborationSessionFactory class.
Returns:
an implementation af the type of Session interface corresponding to this service, e.g., PresenceSession, PersonalStoreSession, ...
Throws:
CollaborationException
See Also:
CollaborationSessionFactory

getNotificationService

public NotificationService getNotificationService()
                                           throws CollaborationException
Get the NotificationService associated with this session.

Throws:
CollaborationException

getConferenceService

public ConferenceService getConferenceService()
                                       throws CollaborationException
Get the ConferenceService associated with this Session.

Throws:
CollaborationException

getNewsService

public NewsService getNewsService()
                           throws CollaborationException
Get the NewsService associated with this Session.

Throws:
CollaborationException

getPersonalStoreService

public PersonalStoreService getPersonalStoreService()
                                             throws CollaborationException
Get the PersonalStoreService associated with this Session.

Throws:
CollaborationException

getPresenceService

public PresenceService getPresenceService()
                                   throws CollaborationException
Get the PresenceService associated with this Session.

Throws:
CollaborationException

getStreamingService

public StreamingService getStreamingService()
                                     throws CollaborationException
Get the StreamingService associated with this Session.

Throws:
CollaborationException

setSessionListener

public void setSessionListener(CollaborationSessionListener listener)
Deprecated. Use addSessionListener(CollaborationSessionListener)

sets the listener for the current session

Parameters:
listener - implementation of CollaborationSessionListener or subclass(es) thereof

addSessionListener

public void addSessionListener(CollaborationSessionListener listener)
Adds the listener for the current session. All the added listeners will receive the notification.

Parameters:
listener - implementation of CollaborationSessionListener or subclass(es) thereof

removeSessionListener

public void removeSessionListener(CollaborationSessionListener listener)
Removes the listener for the current session. The listener should have already been added.

Parameters:
listener - implementation of CollaborationSessionListener or subclass(es) thereof

logout

public void logout()
terminate the session


createPrincipal

public CollaborationPrincipal createPrincipal(java.lang.String uid)
                                       throws CollaborationException
create a principal object based on a fully-qualified user id

Parameters:
uid - FQ user id.
Returns:
a new Principal object.
Throws:
CollaborationException

createPrincipal

public CollaborationPrincipal createPrincipal(java.lang.String uid,
                                              java.lang.String displayName)
                                       throws CollaborationException
create a principal object based on a fully-qualified user id

Parameters:
uid - FQ user id.
displayName -
Returns:
a new Principal object.
Throws:
CollaborationException

getPrincipal

public CollaborationPrincipal getPrincipal()
                                    throws CollaborationException
get the Principal object for the current session

Returns:
the session owner's Principal object.
Throws:
CollaborationException

unregister

public void unregister(RegistrationListener listener)
                throws CollaborationException
unregister the authenticated principal

Parameters:
listener - callback object for getting the unregistration events notifications
Throws:
CollaborationException

changePassword

public void changePassword(java.lang.String password,
                           RegistrationListener listener)
                    throws CollaborationException
changes the password of the authenticated principal

Parameters:
password - new password
listener - callback object for gettint the password change event notifications
Throws:
CollaborationException

createPrivacyList

public PrivacyList createPrivacyList(java.lang.String name)
                              throws CollaborationException
Creates a PrivacyList object. This does not save the PrivacyList on the server

Parameters:
name - The name of the PrivacyList
Returns:
PrivacyList object
Throws:
CollaborationException

getPrivacyList

public PrivacyList getPrivacyList(java.lang.String name)
                           throws CollaborationException
Parameters:
name - The name of the privacy list
Returns:
PrivacyList with the given name
Throws:
CollaborationException

addPrivacyList

public void addPrivacyList(PrivacyList list)
                    throws CollaborationException
Adds the privacy list.

Parameters:
list - stores the privacy list to the server
Throws:
CollaborationException

getDefaultPrivacyListName

public java.lang.String getDefaultPrivacyListName()
                                           throws CollaborationException
gets this users default privacy list

Returns:
The name of the Default Privacy List
Throws:
CollaborationException

setDefaultPrivacyListName

public void setDefaultPrivacyListName(java.lang.String name)
                               throws CollaborationException
sets this users default privacy list

Parameters:
name - The Privacy List name
Throws:
CollaborationException

getActivePrivacyListName

public java.lang.String getActivePrivacyListName()
                                          throws CollaborationException
gets this users active privacy list

Returns:
The active PrivacyList name
Throws:
CollaborationException

setActivePrivacyListName

public void setActivePrivacyListName(java.lang.String name)
                              throws CollaborationException
set this privacy list as active.

Parameters:
name - The PrivacyList name to be made as active. This privacy list will be enforced for the current users session
Throws:
CollaborationException

listPrivacyLists

public java.util.List listPrivacyLists()
                                throws CollaborationException
lists the name of the privacy lists Each Element in the List is a string

Throws:
CollaborationException

removePrivacyList

public void removePrivacyList(java.lang.String name)
                       throws CollaborationException
remove the named PrivacyList. This deletes the privacy list stored on the server.

Parameters:
name - The name of the privacy list to be removed
Throws:
CollaborationException

getMediaService

public org.netbeans.lib.collab.MediaService getMediaService()
                                                     throws CollaborationException
Throws:
CollaborationException