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

List of all members.

Public Member Functions

 SessionNegotiation (final String negotiationID, final JID peer, final String description, final ISarosContext sarosContext)
JID getPeer ()
String getDescription ()
final String getID ()

Protected Member Functions

void notifyCancellation (SarosCancellationException exception)
final Packet collectPacket (PacketCollector collector, long timeout) throws SarosCancellationException
void notifyTerminated (NegotiationListener listener)

Protected Attributes

ITransmitter transmitter
IReceiver receiver
SessionNegotiationHookManager hookManager
final String description
JID peer
final String peerNickname
ISarosSession sarosSession

Static Protected Attributes

static final long PACKET_TIMEOUT
static final long INVITATION_ACCEPTED_TIMEOUT

Detailed Description

Author:
rdjemili
sotitas

Constructor & Destructor Documentation

de.fu_berlin.inf.dpp.negotiation.SessionNegotiation.SessionNegotiation ( final String  negotiationID,
final JID  peer,
final String  description,
final ISarosContext  sarosContext 
)

Member Function Documentation

final Packet de.fu_berlin.inf.dpp.negotiation.SessionNegotiation.collectPacket ( PacketCollector  collector,
long  timeout 
) throws SarosCancellationException [protected]

Returns the next packet from a collector.

Parameters:
collectorthe collector to monitor
timeoutthe amount of time to wait for the next packet (in milliseconds)
Returns:
the collected packet or null if no packet was received
Exceptions:
SarosCancellationExceptionif the process was canceled
String de.fu_berlin.inf.dpp.negotiation.SessionNegotiation.getDescription ( )
Returns:
the user-provided informal description that can be provided with an invitation.
final String de.fu_berlin.inf.dpp.negotiation.SessionNegotiation.getID ( )

Returns the ID of this negotiation.

Returns:
the ID
JID de.fu_berlin.inf.dpp.negotiation.SessionNegotiation.getPeer ( )
void de.fu_berlin.inf.dpp.negotiation.SessionNegotiation.notifyCancellation ( SarosCancellationException  cancellationCause) [protected, virtual]

This method is called after terminateProcess decides to cancel the current process. It is up to the implementing class to forward this notification.

Parameters:
cancellationCausethe cause of the cancellation

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

void de.fu_berlin.inf.dpp.negotiation.SessionNegotiation.notifyTerminated ( NegotiationListener  listener) [protected, virtual]

Informs the listener, that the process is terminated. Otherwise, the SessionManager would block the execution and wait until the process is terminated

Parameters:
listenerto notify

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


Member Data Documentation

Initial value:
 Long.getLong(
        "de.fu_berlin.inf.dpp.negotiation.session.INVITATION_ACCEPTED_TIMEOUT",
        600000L)

Timeout on how long the session negotiation should wait for the remote user to accept the invitation

Initial value:
 Long.getLong(
        "de.fu_berlin.inf.dpp.negotiation.session.PACKET_TIMEOUT", 30000L)

Timeout for all packet exchanges during the session negotiation

 All Classes Namespaces Files Functions Variables Enumerations