Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Public Member Functions | |
ConcurrentDocumentClient (ISarosSession sarosSession) | |
IActivity | transformToJupiter (IActivity activity) |
List< IActivity > | transformFromJupiter (IActivity activity) |
synchronized void | reset (SPath path) |
boolean | isCurrent (ChecksumActivity checksumActivity) |
ConcurrentDocumentClient is responsible for managing the Jupiter interaction on the local side of the clients.
A client exists for every participant (also the host!) to take local TextEdits and transforms them into JupiterActivities to send to the Server on the host-side.
When JupiterActivities are received from the server they are transformed by the ConcurrentDocumentClient to TextEditActivities which can then be executed locally.
de.fu_berlin.inf.dpp.concurrent.management.ConcurrentDocumentClient.ConcurrentDocumentClient | ( | ISarosSession | sarosSession | ) |
boolean de.fu_berlin.inf.dpp.concurrent.management.ConcurrentDocumentClient.isCurrent | ( | ChecksumActivity | checksumActivity | ) |
synchronized void de.fu_berlin.inf.dpp.concurrent.management.ConcurrentDocumentClient.reset | ( | SPath | path | ) |
Resets the JupiterClient for the given path.
When this is called on the client (or on the host for one of his JupiterClient), a call to ConcurrentDocumentServer#reset(de.fu_berlin.inf.dpp.net.JID, SPath) should be executed at the same time on the side of the given user.
and This can be called on the host as well, if the host wants to reset his client document (which at the moment never happens, because the version of the host is the authoritative one and thus does not need to be reset).
List<IActivity> de.fu_berlin.inf.dpp.concurrent.management.ConcurrentDocumentClient.transformFromJupiter | ( | IActivity | activity | ) |
This method is called when activities received over the network should be executed locally.
This method will transform them back from Jupiter-specific activities to locally executable activities.
Must be called on the GUI Thread to ensure proper synchronization
and This is called whenever activities are received from REMOTELY both on the client and on the host
activity | The activity to be transformed |
IActivity de.fu_berlin.inf.dpp.concurrent.management.ConcurrentDocumentClient.transformToJupiter | ( | IActivity | activity | ) |
This is called when an activity has been caused by the local user This method checks if an activity has to be transformed into a Jupiter-specific-activity and transforms it if needed.
Must be called on the GUI Thread to ensure proper synchronization
and This is called whenever activities are created locally both on the client and on the host
activity | The activity to be transformed |
Only the host can generate Checksums