Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.project.internal.ActivityHandler Class Reference

Inherits Startable.

List of all members.

Public Member Functions

 ActivityHandler (ISarosSession session, IActivityHandlerCallback callback, ConcurrentDocumentServer documentServer, ConcurrentDocumentClient documentClient, UISynchronizer synchronizer)
synchronized void handleIncomingActivities (List< IActivity > activities)
void handleOutgoingActivities (final List< IActivity > activities)
void start ()
void stop ()

Static Package Functions

 [static initializer]

Detailed Description

This handler is responsible for handling the correct thread access when transforming activities with the ConcurrentDocumentServer and ConcurrentDocumentClient. The sending and executing of activities must be done in IActivityHandlerCallback callback} as it is not performed by this handler !

Author:
Stefan Rossbach

Constructor & Destructor Documentation

de.fu_berlin.inf.dpp.project.internal.ActivityHandler.ActivityHandler ( ISarosSession  session,
IActivityHandlerCallback  callback,
ConcurrentDocumentServer  documentServer,
ConcurrentDocumentClient  documentClient,
UISynchronizer  synchronizer 
)

Member Function Documentation

de.fu_berlin.inf.dpp.project.internal.ActivityHandler.[static initializer] ( ) [static, package]
synchronized void de.fu_berlin.inf.dpp.project.internal.ActivityHandler.handleIncomingActivities ( List< IActivity activities)

Transforms and dispatches the activities. The IActivityHandlerCallback callback} will be notified about the results.

Parameters:
activitiesan immutable list containing the activities

8, Activity sending, Activity Server:

This is where the server receives activities. The Server may transform activities again if necessary and afterward sends them to the correct clients.

9, Activity sending, Client Receiver:

This is the part where clients will receive activities. These activities are put into the queue of the activity dispatcher. This queue is consumed by the dispatchThread, which transforms activities again if necessary, and then forwards it to the SarosSession.

void de.fu_berlin.inf.dpp.project.internal.ActivityHandler.handleOutgoingActivities ( final List< IActivity activities)

6, Activity sending, Transforming the IActivity (Client):

This function will transform activities and then forward them to the callback. E.g. this will turn TextEditActivity into Jupiter activities.

Saros uses a client-server-architecture. All activities will first be send to the server located at the Host. The Host himself also acts as a client, but houses an additional server-part. Transforms and determines the recipients of the activities. The IActivityHandlerCallback callback} will be notified about the results.

Parameters:
activitiesan immutable list containing the activities
void de.fu_berlin.inf.dpp.project.internal.ActivityHandler.start ( )
void de.fu_berlin.inf.dpp.project.internal.ActivityHandler.stop ( )
 All Classes Namespaces Files Functions Variables Enumerations