Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Static Public Member Functions | |
static void | closeUnnecessaryViews (AbstractTester tester) throws RemoteException |
static void | openSarosView (AbstractTester tester) throws RemoteException |
static void | setUpSessionWithProjectAndFile (String projectName, String path, String content, AbstractTester inviter, AbstractTester...invitees) throws Exception |
static void | setUpSessionWithJavaProjectAndClass (String projectName, String packageName, String className, AbstractTester inviter, AbstractTester...invitees) throws Exception |
static void | setUpSessionWithJavaProjects (Map< String, List< String >> projectsPkgsClasses, AbstractTester inviter, AbstractTester...invitees) |
static void | createProjectWithEmptyFile (String projectName, String path, AbstractTester...testers) throws Exception |
static void | addProjectToSessionSequentially (String projectName, TypeOfCreateProject projectType, AbstractTester inviter, AbstractTester...invitees) throws Exception |
static void | buildSessionSequentially (String projectName, TypeOfCreateProject projectType, AbstractTester inviter, AbstractTester...invitees) throws Exception |
static void | buildSessionConcurrently (final String projectName, final TypeOfCreateProject projectType, AbstractTester inviter, AbstractTester...invitees) throws Exception |
static void | buildFileSessionConcurrently (final String projectName, String[] files, final TypeOfCreateProject projectType, AbstractTester inviter, AbstractTester...invitees) throws Exception |
static void | activateFollowMode (final AbstractTester followedParticipant, AbstractTester...participants) throws Exception |
static void | addTestersToContactList (AbstractTester tester, AbstractTester...testers) throws Exception |
static void | removeTestersFromContactList (AbstractTester tester, AbstractTester...testers) throws Exception |
static void | addTestersToSession (final String projectName, final TypeOfCreateProject projectType, AbstractTester inviter, AbstractTester...invitees) throws Exception |
static String[] | getBaseJID (AbstractTester...tester) |
static JID[] | getJID (AbstractTester...tester) |
static void | grantWriteAccess (AbstractTester host, AbstractTester...testers) throws Exception |
static void | stopFollowModeSequentially (AbstractTester...testers) throws Exception |
static void | stopFollowModeConcurrently (AbstractTester...testers) throws Exception |
static void | reBuildSession (String projectName, AbstractTester inviter, AbstractTester...invitees) throws Exception |
static String | classPathToFilePath (String projectName, String pkg, String className) |
static< T > List< T > | workAll (List< Callable< T >> tasks) |
static< T > List< T > | workAll (List< Callable< T >> tasks, int numberOfThreads) |
static boolean | joinAll (long timeout, Thread...threads) |
static void de.fu_berlin.inf.dpp.stf.client.util.Util.activateFollowMode | ( | final AbstractTester | followedParticipant, |
AbstractTester... | participants | ||
) | throws Exception [static] |
Activates the Follow mode feature. Activating Follow mode when the followed participant has no open editors results in failure of this method.
followedParticipant | the participant to follow e.g ALICE |
participants | the list of participants who want to activate Follow mode e.g BOB, CARL |
TimeoutException | if the follow participant has no editor open or the editor activity was not received yet |
IllegalStateException | if the followed participant or one of the participants is not connected or not in a session |
Exception | for any other (internal) failure |
static void de.fu_berlin.inf.dpp.stf.client.util.Util.addProjectToSessionSequentially | ( | String | projectName, |
TypeOfCreateProject | projectType, | ||
AbstractTester | inviter, | ||
AbstractTester... | invitees | ||
) | throws Exception [static] |
Adds a project to the current session. This is done sequentially, so the project is send to the invitees one after another.
Note: Adding a project that is already shared or does not exist results in unexpected behavior.
Note: there is no guarantee that the project and its files are already shared after this method returns
projectName | the name of the project |
projectType | the type of project that should be used on the invitee side e.g new, use existing ... |
inviter | e.g. ALICE |
invitees | e.g. BOB, CARL |
IllegalStateException | if the inviter or one of the invitee is not connected or is not in a session |
Exception | for any other (internal) failure |
static void de.fu_berlin.inf.dpp.stf.client.util.Util.addTestersToContactList | ( | AbstractTester | tester, |
AbstractTester... | testers | ||
) | throws Exception [static] |
Adds testers to the contact list of the tester. All testers will have the tester added to their contact list as well.
tester | the tester who wants to add testers to his contact list e.g ALICE |
testers | the testers to add, e.g BOB, CARL |
IllegalStateException | if the tester or one of the testers is not connected |
Exception | for any other (internal) failure |
static void de.fu_berlin.inf.dpp.stf.client.util.Util.addTestersToSession | ( | final String | projectName, |
final TypeOfCreateProject | projectType, | ||
AbstractTester | inviter, | ||
AbstractTester... | invitees | ||
) | throws Exception [static] |
Adds testers to the current session.
Note: there is no guarantee that the project and its files are already shared after this method returns
projectName | the name of the project which must be shared in the current session |
projectType | the type of project that should be used on the invitee side e.g new, use existing ... |
inviter | the test who must be host of the current session |
invitees | the testers you want to invite to your session |
IllegalStateException | if the inviter or one of the invitees is not connected, one of the invitee is already in a session or the inviter is not host |
Exception | for any other (internal) failure |
static void de.fu_berlin.inf.dpp.stf.client.util.Util.buildFileSessionConcurrently | ( | final String | projectName, |
String[] | files, | ||
final TypeOfCreateProject | projectType, | ||
AbstractTester | inviter, | ||
AbstractTester... | invitees | ||
) | throws Exception [static] |
Establish a Saros session with specific files of a project. All invitees are invited simultaneously.
Note: Establishing session with a project that is already shared or does not exist results in unexpected behavior.
Note: there is no guarantee that the project and its files are already shared after this method returns
projectName | the name of the project to share |
files | the files of the project to share |
projectType | the type of project that should be used on the invitee side e.g new, use existing ... |
inviter | e.g. ALICE |
invitees | e.g. BOB, CARL |
IllegalStateException | if the inviter or one of the invitee is not connected or is already in a session |
Exception | for any other (internal) failure |
static void de.fu_berlin.inf.dpp.stf.client.util.Util.buildSessionConcurrently | ( | final String | projectName, |
final TypeOfCreateProject | projectType, | ||
AbstractTester | inviter, | ||
AbstractTester... | invitees | ||
) | throws Exception [static] |
Establish a Saros session with the given invitees. All invitees are invited simultaneously.
Note: Establishing session with a project that is already shared or does not exist results in unexpected behavior.
Note: there is no guarantee that the project and its files are already shared after this method returns
projectName | the name of the project to share |
projectType | the type of project that should be used on the invitee side e.g new, use existing ... |
inviter | e.g. ALICE |
invitees | e.g. BOB, CARL |
IllegalStateException | if the inviter or one of the invitee is not connected or is already in a session |
Exception | for any other (internal) failure |
static void de.fu_berlin.inf.dpp.stf.client.util.Util.buildSessionSequentially | ( | String | projectName, |
TypeOfCreateProject | projectType, | ||
AbstractTester | inviter, | ||
AbstractTester... | invitees | ||
) | throws Exception [static] |
Establish a Saros session with the given invitees. Every invitee is invited one bye one.
Note: Establishing session with a project that is already shared or does not exist results in unexpected behavior.
Note: there is no guarantee that the project and its files are already shared after this method returns
projectName | the name of the project to share |
projectType | the type of project that should be used on the invitee side e.g new, use existing ... |
inviter | e.g. ALICE |
invitees | e.g. BOB, CARL |
IllegalStateException | if the inviter or one of the invitee is not connected or is already in a session |
Exception | for any other (internal) failure |
static String de.fu_berlin.inf.dpp.stf.client.util.Util.classPathToFilePath | ( | String | projectName, |
String | pkg, | ||
String | className | ||
) | [static] |
Converts a class path of and Eclipse JDT project to its real path.
E.g project name = foo, pkg = my.foo, className = HelloWorld will be converted to foo/src/my/foo/HelloWorld.java
projectName | the name of an Eclipse project |
pkg | a java package name |
className | a class name |
static void de.fu_berlin.inf.dpp.stf.client.util.Util.closeUnnecessaryViews | ( | AbstractTester | tester | ) | throws RemoteException [static] |
Closes the following views:
tester | the remote tester e.g ALICE |
static void de.fu_berlin.inf.dpp.stf.client.util.Util.createProjectWithEmptyFile | ( | String | projectName, |
String | path, | ||
AbstractTester... | testers | ||
) | throws Exception [static] |
Creates a project with an empty file for every tester in his workspace. The project and the file must not exist.
projectName | the name of the project |
path | the path of the file e.g. foo/bar/readme.txt |
testers | e.g. ALICE, CARL |
Exception | if a (internal) failure occurs |
static String [] de.fu_berlin.inf.dpp.stf.client.util.Util.getBaseJID | ( | AbstractTester... | tester | ) | [static] |
Returns the base part of the JID from the tester.
tester | a list of tester |
static JID [] de.fu_berlin.inf.dpp.stf.client.util.Util.getJID | ( | AbstractTester... | tester | ) | [static] |
Returns the JID from the tester.
tester | a list of tester |
static void de.fu_berlin.inf.dpp.stf.client.util.Util.grantWriteAccess | ( | AbstractTester | host, |
AbstractTester... | testers | ||
) | throws Exception [static] |
Grants write access to the given testers.
host | the host of the current session, e.g ALICE |
testers | testers that are in the current session and should gain write access, e.g BOB, CARL |
IllegalStateException | if the host or one of the participants is not connected or is not in a session or the host is not host of the current session host |
Exception | for any other (internal) failure |
static boolean de.fu_berlin.inf.dpp.stf.client.util.Util.joinAll | ( | long | timeout, |
Thread... | threads | ||
) | [static] |
Waits until all threads terminate.
timeout | how long to wait in milliseconds until timeout |
threads | the threads to observe |
true
if all threads terminated, false
if the timeout is exceeded static void de.fu_berlin.inf.dpp.stf.client.util.Util.openSarosView | ( | AbstractTester | tester | ) | throws RemoteException [static] |
Opens the Saros view
tester | the remote tester e.g. ALICE |
static void de.fu_berlin.inf.dpp.stf.client.util.Util.reBuildSession | ( | String | projectName, |
AbstractTester | inviter, | ||
AbstractTester... | invitees | ||
) | throws Exception [static] |
Rebuilds a session if necessary with the given testers. If the project does not exists on the inviter side an empty non Java Project will be created. Participants that are already (in a different) session will not be invited.
Note: there is no guarantee that the project and its files are already shared after this method returns
Note: calling this method with always different project names during a session will result in unexpected behavior
projectName | the name of the project |
inviter | e.g. ALICE |
invitees | e.g. BOB, CARL |
IllegalStateException | if the host or one of the participants is not connected |
Exception | for any other (internal) failure |
static void de.fu_berlin.inf.dpp.stf.client.util.Util.removeTestersFromContactList | ( | AbstractTester | tester, |
AbstractTester... | testers | ||
) | throws Exception [static] |
Removes the given testers from the contact list of the tester. All testers will have the tester removed from their contact list as well.
tester | the tester who wants to remove testers from his contact list e.g ALICE |
testers | the testers to remove, e.g BOB, CARL |
IllegalStateException | if the tester or one of the testers is not connected |
Exception | for any other (internal) failure |
static void de.fu_berlin.inf.dpp.stf.client.util.Util.setUpSessionWithJavaProjectAndClass | ( | String | projectName, |
String | packageName, | ||
String | className, | ||
AbstractTester | inviter, | ||
AbstractTester... | invitees | ||
) | throws Exception [static] |
A convenient function to quickly build a session with a java project and a class. The project is created by this method so it must not exist before. The invitiees are invited concurrently.
Note: there is no guarantee that the project and its files are already shared after this method returns
projectName | the name of the project |
packageName | the name of the package |
className | the name of the class without .java or .class suffix |
inviter | e.g. ALICE |
invitees | e.g. BOB, CARL |
IllegalStateException | if the inviter or one of the invitee is not connected or is already in a session |
Exception | for any other (internal) failure |
static void de.fu_berlin.inf.dpp.stf.client.util.Util.setUpSessionWithJavaProjects | ( | Map< String, List< String >> | projectsPkgsClasses, |
AbstractTester | inviter, | ||
AbstractTester... | invitees | ||
) | [static] |
static void de.fu_berlin.inf.dpp.stf.client.util.Util.setUpSessionWithProjectAndFile | ( | String | projectName, |
String | path, | ||
String | content, | ||
AbstractTester | inviter, | ||
AbstractTester... | invitees | ||
) | throws Exception [static] |
A convenient function to quickly build a session with a project and a file. The project is created by this method so it must not exist before. The invitiees are invited concurrently.
Note: there is no guarantee that the project and its files are already shared after this method returns
projectName | the name of the project |
path | the path of the file e.g. foo/bar/readme.txt |
content | the content of the file |
inviter | e.g. ALICE |
invitees | e.g. BOB, CARL |
IllegalStateException | if the inviter or one of the invitee is not connected or is already in a session |
Exception | for any other (internal) failure |
static void de.fu_berlin.inf.dpp.stf.client.util.Util.stopFollowModeConcurrently | ( | AbstractTester... | testers | ) | throws Exception [static] |
Stops the follow mode feature. This is done concurrently for all given testers.
testers | testers that are currently in the a session where follow mode should been stopped |
IllegalStateException | if one of the testers is not connected or not in a session |
Exception | for any other (internal) failure |
static void de.fu_berlin.inf.dpp.stf.client.util.Util.stopFollowModeSequentially | ( | AbstractTester... | testers | ) | throws Exception [static] |
Stops the follow mode feature for all given testers.
testers | testers that are currently in the a session where follow mode should been stopped |
IllegalStateException | if one of the testers is not connected or not in a session |
Exception | for any other (internal) failure |
static <T> List<T> de.fu_berlin.inf.dpp.stf.client.util.Util.workAll | ( | List< Callable< T >> | tasks, |
int | numberOfThreads | ||
) | [static] |
Invokes all callable tasks in the list and returns when all tasks completed.
<T> | |
tasks | a list containing callable tasks |
numberOfThreads | the number of threads to use to execute the tasks |
static <T> List<T> de.fu_berlin.inf.dpp.stf.client.util.Util.workAll | ( | List< Callable< T >> | tasks | ) | [static] |
Invokes all callable tasks in the list and returns when all tasks completed.
<T> | |
tasks | a list containing callable tasks |