Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.session.ISarosSessionManager Interface Reference
Inheritance diagram for de.fu_berlin.inf.dpp.session.ISarosSessionManager:
de.fu_berlin.inf.dpp.core.project.SarosSessionManager de.fu_berlin.inf.dpp.project.SarosSessionManager

List of all members.

Public Member Functions

ISarosSession getSarosSession ()
void startSession (Map< IProject, List< IResource >> projectResources)
ISarosSession joinSession (final String id, JID host, String clientNickname, String hostNickname, int clientColor, int hostColor)
void stopSarosSession ()
void addSarosSessionListener (ISarosSessionListener listener)
void removeSarosSessionListener (ISarosSessionListener listener)
void invitationReceived (JID from, String sessionID, String invitationID, String version, String description)
void startSharingProjects (JID user)
void invite (JID toInvite, String description)
void invite (Collection< JID > jidsToInvite, String description)
void addResourcesToSession (Map< IProject, List< IResource >> projectResourcesMapping)
void incomingProjectReceived (JID from, List< ProjectNegotiationData > projectInfos, String processID)
void projectAdded (String projectID)
void sessionStarting (ISarosSession sarosSession)
void sessionStarted (ISarosSession sarosSession)
void postOutgoingInvitationCompleted (IProgressMonitor monitor, User newUser)

Detailed Description

Interface for starting and stopping a DPP session. It also offers support for monitoring the life-cycle of a session.


Member Function Documentation

void de.fu_berlin.inf.dpp.session.ISarosSessionManager.addResourcesToSession ( Map< IProject, List< IResource >>  projectResourcesMapping)

Adds project resources to an existing session.

Parameters:
projectResourcesMapping

Implemented in de.fu_berlin.inf.dpp.project.SarosSessionManager, and de.fu_berlin.inf.dpp.core.project.SarosSessionManager.

void de.fu_berlin.inf.dpp.session.ISarosSessionManager.addSarosSessionListener ( ISarosSessionListener  listener)

Add the given session listener.

Parameters:
listenerthe listener that is to be added.

Implemented in de.fu_berlin.inf.dpp.project.SarosSessionManager, and de.fu_berlin.inf.dpp.core.project.SarosSessionManager.

ISarosSession de.fu_berlin.inf.dpp.session.ISarosSessionManager.getSarosSession ( )
Returns:
the active SarosSession object or null if there is no active session.

Implemented in de.fu_berlin.inf.dpp.project.SarosSessionManager, and de.fu_berlin.inf.dpp.core.project.SarosSessionManager.

void de.fu_berlin.inf.dpp.session.ISarosSessionManager.incomingProjectReceived ( JID  from,
List< ProjectNegotiationData projectInfos,
String  processID 
)

This method is called when a new project was added to the session

Parameters:
fromThe one who added the project.
projectInfoswhat projects where added (FileList, projectName etc.) see: ProjectNegotiationData
processIDID of the exchanging process

Implemented in de.fu_berlin.inf.dpp.project.SarosSessionManager, and de.fu_berlin.inf.dpp.core.project.SarosSessionManager.

void de.fu_berlin.inf.dpp.session.ISarosSessionManager.invitationReceived ( JID  from,
String  sessionID,
String  invitationID,
String  version,
String  description 
)

Handles the negotiation process for a received invitation.

Parameters:
fromthe sender of this invitation
sessionIDthe unique session ID of the inviter side
invitationIDa unique identifier for the negotiation process
versionremote Saros version of the inviter side
descriptionwhat this session invitation is about
Deprecated:
will be removed from the interface - do not use in new code

Implemented in de.fu_berlin.inf.dpp.project.SarosSessionManager, and de.fu_berlin.inf.dpp.core.project.SarosSessionManager.

void de.fu_berlin.inf.dpp.session.ISarosSessionManager.invite ( JID  toInvite,
String  description 
)

Invites a user to a running session. Does nothing if no session is running, the user is already part of the session or is currently in the invitation process.

Parameters:
toInvitethe JID of the user that is to be invited.

Implemented in de.fu_berlin.inf.dpp.project.SarosSessionManager, and de.fu_berlin.inf.dpp.core.project.SarosSessionManager.

void de.fu_berlin.inf.dpp.session.ISarosSessionManager.invite ( Collection< JID jidsToInvite,
String  description 
)

Invites users to the shared project.

Parameters:
jidsToInvitethe JIDs of the users that should be invited.

Implemented in de.fu_berlin.inf.dpp.project.SarosSessionManager, and de.fu_berlin.inf.dpp.core.project.SarosSessionManager.

ISarosSession de.fu_berlin.inf.dpp.session.ISarosSessionManager.joinSession ( final String  id,
JID  host,
String  clientNickname,
String  hostNickname,
int  clientColor,
int  hostColor 
)

Creates a Saros session. The returned session is NOT started!

Parameters:
hostthe host of the session.
Returns:
the new Saros session.
void de.fu_berlin.inf.dpp.session.ISarosSessionManager.postOutgoingInvitationCompleted ( IProgressMonitor  monitor,
User  newUser 
)

Call this on the host after the invitation was accepted and has been completed.

Implemented in de.fu_berlin.inf.dpp.project.SarosSessionManager, and de.fu_berlin.inf.dpp.core.project.SarosSessionManager.

void de.fu_berlin.inf.dpp.session.ISarosSessionManager.projectAdded ( String  projectID)

Call this when a new project was added.

Parameters:
projectIDTODO

Implemented in de.fu_berlin.inf.dpp.project.SarosSessionManager, and de.fu_berlin.inf.dpp.core.project.SarosSessionManager.

void de.fu_berlin.inf.dpp.session.ISarosSessionManager.removeSarosSessionListener ( ISarosSessionListener  listener)

Removes the given session listener.

Parameters:
listenerthe listener that is to be removed.

Implemented in de.fu_berlin.inf.dpp.project.SarosSessionManager, and de.fu_berlin.inf.dpp.core.project.SarosSessionManager.

void de.fu_berlin.inf.dpp.session.ISarosSessionManager.sessionStarted ( ISarosSession  sarosSession)
void de.fu_berlin.inf.dpp.session.ISarosSessionManager.sessionStarting ( ISarosSession  sarosSession)
void de.fu_berlin.inf.dpp.session.ISarosSessionManager.startSession ( Map< IProject, List< IResource >>  projectResources)

Starts a new Saros session with the local user as only participant.

Parameters:
projectResourcesthe local Eclipse project resources which should become shared.
void de.fu_berlin.inf.dpp.session.ISarosSessionManager.startSharingProjects ( JID  user)

Will start sharing all projects of the current session with a participant. This should be called after a the invitation to a session was completed successfully.

Parameters:
userJID of session participant to share projects with

Implemented in de.fu_berlin.inf.dpp.project.SarosSessionManager, and de.fu_berlin.inf.dpp.core.project.SarosSessionManager.

void de.fu_berlin.inf.dpp.session.ISarosSessionManager.stopSarosSession ( )

Leaves the currently active session. If the local user is the host, this will close the session for everybody.

Has no effect if there is no open session.

Implemented in de.fu_berlin.inf.dpp.project.SarosSessionManager, and de.fu_berlin.inf.dpp.core.project.SarosSessionManager.

 All Classes Namespaces Files Functions Variables Enumerations