Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.activities.StopActivity Class Reference
Inheritance diagram for de.fu_berlin.inf.dpp.activities.StopActivity:
de.fu_berlin.inf.dpp.activities.AbstractActivity de.fu_berlin.inf.dpp.activities.ITargetedActivity de.fu_berlin.inf.dpp.activities.IActivity de.fu_berlin.inf.dpp.activities.IActivity

List of all members.

Public Types

enum  Type { LOCKREQUEST, UNLOCKREQUEST }
enum  State { INITIATED, ACKNOWLEDGED }

Public Member Functions

 StopActivity (User source, User initiator, User affected, Type type, State state, String stopActivityID)
boolean isValid ()
int hashCode ()
boolean equals (Object obj)
User getAffected ()
User getInitiator ()
User getRecipient ()
User getTarget ()
State getState ()
StopActivity generateAcknowledgment (User source)
Type getType ()
String getActivityID ()
String toString ()
void dispatch (IActivityReceiver receiver)

Protected Attributes

User initiator
final User affected
final Type type
final State state
final String stopActivityID

Detailed Description

3, StopManager:

The StopActivity is created by the StopManager.stop() method, it contains the kind of request and the #user that should be stopped. A StopActivity is used for signaling to a user that he should be stopped or started (meaning that no more Activities should be generated by this user).


Member Enumeration Documentation

Enumerator:
INITIATED 
ACKNOWLEDGED 
Enumerator:
LOCKREQUEST 
UNLOCKREQUEST 

Constructor & Destructor Documentation

de.fu_berlin.inf.dpp.activities.StopActivity.StopActivity ( User  source,
User  initiator,
User  affected,
Type  type,
State  state,
String  stopActivityID 
)
Parameters:
source
initiatorThe user who requested the lock/unlock (in most cases this should be the host)
affectedThe user to be locked/unlocked by this Activity
type
state
stopActivityID

Member Function Documentation

void de.fu_berlin.inf.dpp.activities.StopActivity.dispatch ( IActivityReceiver  receiver)
boolean de.fu_berlin.inf.dpp.activities.StopActivity.equals ( Object  obj)
StopActivity de.fu_berlin.inf.dpp.activities.StopActivity.generateAcknowledgment ( User  source)
String de.fu_berlin.inf.dpp.activities.StopActivity.getActivityID ( )
User de.fu_berlin.inf.dpp.activities.StopActivity.getAffected ( )

The user to be locked/unlocked by this Activity

User de.fu_berlin.inf.dpp.activities.StopActivity.getInitiator ( )

The user who requested the lock/unlock.

(in most cases this should be the host)

User de.fu_berlin.inf.dpp.activities.StopActivity.getRecipient ( )

Returns the JID of the user to whom this StopActivity should be sent.

This method is a convenience method for getting the affected user or initiator based on the state of this StopActivity.

State de.fu_berlin.inf.dpp.activities.StopActivity.getState ( )
User de.fu_berlin.inf.dpp.activities.StopActivity.getTarget ( )
Returns:
the users that should receive this activity

Implements de.fu_berlin.inf.dpp.activities.ITargetedActivity.

Type de.fu_berlin.inf.dpp.activities.StopActivity.getType ( )
int de.fu_berlin.inf.dpp.activities.StopActivity.hashCode ( )
boolean de.fu_berlin.inf.dpp.activities.StopActivity.isValid ( )
String de.fu_berlin.inf.dpp.activities.StopActivity.toString ( )

Member Data Documentation

The user who has to be locked / unlocked.

A stop activity has a unique ID.

 All Classes Namespaces Files Functions Variables Enumerations