Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.negotiation.IncomingSessionNegotiation Class Reference
Inheritance diagram for de.fu_berlin.inf.dpp.negotiation.IncomingSessionNegotiation:
de.fu_berlin.inf.dpp.negotiation.SessionNegotiation de.fu_berlin.inf.dpp.negotiation.CancelableProcess

List of all members.

Public Member Functions

 IncomingSessionNegotiation (ISarosSessionManager sessionManager, String sessionID, JID from, String remoteVersion, String invitationID, String description, ISarosContext sarosContext)
synchronized boolean remoteCancel (String errorMsg)
synchronized boolean localCancel (String errorMsg, CancelOption cancelOption)
String getRemoteVersion ()
Status accept (IProgressMonitor monitor)
String toString ()

Protected Member Functions

void executeCancellation ()

Constructor & Destructor Documentation

de.fu_berlin.inf.dpp.negotiation.IncomingSessionNegotiation.IncomingSessionNegotiation ( ISarosSessionManager  sessionManager,
String  sessionID,
JID  from,
String  remoteVersion,
String  invitationID,
String  description,
ISarosContext  sarosContext 
)

Member Function Documentation

Status de.fu_berlin.inf.dpp.negotiation.IncomingSessionNegotiation.accept ( IProgressMonitor  monitor)

9, Invitation Process:

This method is called by the JoinSessionWizard after the user clicked on "Finish" (indicating that he is willing to join the session).

(4b) Send acceptance to host.

(5a) Create "wishlist" with session's parameters (e.g. preferred color) and send it.

(6b) Wait for host's response.

(7) Initialize the session and related components (e.g. chat, color management) with the parameters as defined by the host.

(8) Start the session accordingly, inform the host and wait for his final acknowledgement (which indicates, that this client has been successfully added to the session and will receive activities from now on).

void de.fu_berlin.inf.dpp.negotiation.IncomingSessionNegotiation.executeCancellation ( ) [protected, virtual]

This method is called after terminateProcess decides to perform a cleanup because the execution of the process was canceled. Implementing classes should try a maximum effort to revert all the changes that were made before the process was aborted.

Implements de.fu_berlin.inf.dpp.negotiation.CancelableProcess.

String de.fu_berlin.inf.dpp.negotiation.IncomingSessionNegotiation.getRemoteVersion ( )

Returns the Saros version of the remote side.

synchronized boolean de.fu_berlin.inf.dpp.negotiation.IncomingSessionNegotiation.localCancel ( String  errorMessage,
CancelOption  cancelOption 
)

Informs the current process that it should cancel its operation as soon as possible. Calling this method multiple times will NOT override the error message or the cancel option. This method will also have NO effect if a remote cancellation request was already executed.

Parameters:
errorMessagethe reason to cancel the execution in case of an error or null if this is a normal cancel request
cancelOptioneither CancelOption#NOTIFY_PEER to inform the remote side of the cancellation or CancelOption#DO_NOT_NOTIFY_PEER
Returns:
true if this request was the first cancel request, false otherwise
See also:
remoteCancel
checkCancellation
notifyCancellation

Reimplemented from de.fu_berlin.inf.dpp.negotiation.CancelableProcess.

synchronized boolean de.fu_berlin.inf.dpp.negotiation.IncomingSessionNegotiation.remoteCancel ( String  errorMessage)

Informs the current process that it should cancel its operation as soon as possible. Calling this method multiple times will NOT override the error message. This method will also have NO effect if a local cancellation request was already executed.

Parameters:
errorMessagethe reason to cancel the execution in case of an error or null if this is a cancel abort request
Returns:
true if this request was the first cancel request, false otherwise
See also:
localCancel
checkCancellation
notifyCancellation

Reimplemented from de.fu_berlin.inf.dpp.negotiation.CancelableProcess.

String de.fu_berlin.inf.dpp.negotiation.IncomingSessionNegotiation.toString ( )
 All Classes Namespaces Files Functions Variables Enumerations