Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.activities.AbstractActivity Class Reference
Inheritance diagram for de.fu_berlin.inf.dpp.activities.AbstractActivity:
de.fu_berlin.inf.dpp.activities.IActivity de.fu_berlin.inf.dpp.activities.AbstractResourceActivity de.fu_berlin.inf.dpp.activities.ChangeColorActivity de.fu_berlin.inf.dpp.activities.ChecksumErrorActivity de.fu_berlin.inf.dpp.activities.NOPActivity de.fu_berlin.inf.dpp.activities.PermissionActivity de.fu_berlin.inf.dpp.activities.ProgressActivity de.fu_berlin.inf.dpp.activities.ShareConsoleActivity de.fu_berlin.inf.dpp.activities.StartFollowingActivity de.fu_berlin.inf.dpp.activities.StopActivity de.fu_berlin.inf.dpp.activities.StopFollowingActivity

List of all members.

Public Member Functions

 AbstractActivity (User source)
boolean isValid ()
User getSource ()
int hashCode ()
boolean equals (Object obj)

Constructor & Destructor Documentation

de.fu_berlin.inf.dpp.activities.AbstractActivity.AbstractActivity ( User  source)

2, Creating a new Activity type, The abstract class to extend:

Instead of directly implementing IActivity, any new activity type should extends this class.

However, there is an important subtype of activities: An activity that refers to a resource, such as a file, should implement the more specialized IResourceActivity interface. And guess what, there is an abstract class for this interface, too: AbstractResourceActivity.

So once you decided which of these two abstract classes to extend, you can provide your new class with all fields and methods you deem necessary, and then continue with the next stop.

Parameters:
sourceMust not be null

Member Function Documentation

User de.fu_berlin.inf.dpp.activities.AbstractActivity.getSource ( )

1, Creating a new Activity type, The IActivity interface:

This tour explains what you need to consider when you want to create a new Activity type.

IActivity is the base interface for all activity implementations. The only common attribute of all IActivity instances is the source, that is the session participant who did "something" and therefore caused this activity in the first place.

So create a new class in the "activities" package with the suffix "Activity", and continue with the next stop. 3, Some Basics:

When a session has begun, messages are passed between all participants to keep the session synchronized. The messages are known as Activities and come in different types. Each type inherits from this interface and implements its specific behavior.

Handling of Activities is done using the Inversion of Control pattern. Returns the user who caused this activity.

Returns:
not null

Implements de.fu_berlin.inf.dpp.activities.IActivity.

 All Classes Namespaces Files Functions Variables Enumerations