Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Public Member Functions | |
ProjectNegotiation (final String negotiationID, final String sessionID, final JID peer, ISarosContext sarosContext) | |
abstract Map< String, String > | getProjectNames () |
final String | getID () |
final String | getSessionID () |
final JID | getPeer () |
Static Public Attributes | |
static final String | ARCHIVE_TRANSFER_ID = "saros-dpp-pn-server-client-archive/" |
Protected Member Functions | |
void | notifyCancellation (SarosCancellationException exception) |
void | monitorFileTransfer (FileTransfer transfer, IProgressMonitor monitor) throws SarosCancellationException, IOException |
final Packet | collectPacket (PacketCollector collector, long timeout) throws SarosCancellationException |
void | notifyTerminated (NegotiationListener listener) |
Protected Attributes | |
XMPPConnectionService | connectionService |
ITransmitter | transmitter |
IReceiver | xmppReceiver |
VCSProviderFactory | vcsProviderFactory |
final JID | peer |
FileTransferManager | fileTransferManager |
ISarosSessionManager | sessionManager |
Static Protected Attributes | |
static final String | PATH_DELIMITER = ":" |
static final long | PACKET_TIMEOUT |
This abstract class is the superclass for OutgoingProjectNegotiation and IncomingProjectNegotiation.
de.fu_berlin.inf.dpp.negotiation.ProjectNegotiation.ProjectNegotiation | ( | final String | negotiationID, |
final String | sessionID, | ||
final JID | peer, | ||
ISarosContext | sarosContext | ||
) |
final Packet de.fu_berlin.inf.dpp.negotiation.ProjectNegotiation.collectPacket | ( | PacketCollector | collector, |
long | timeout | ||
) | throws SarosCancellationException [protected] |
Returns the next packet from a collector.
collector | the collector to monitor |
timeout | the amount of time to wait for the next packet (in milliseconds) |
null
if no packet was received SarosCancellationException | if the process was canceled |
final String de.fu_berlin.inf.dpp.negotiation.ProjectNegotiation.getID | ( | ) |
Returns the ID of this negotiation.
final JID de.fu_berlin.inf.dpp.negotiation.ProjectNegotiation.getPeer | ( | ) |
abstract Map<String, String> de.fu_berlin.inf.dpp.negotiation.ProjectNegotiation.getProjectNames | ( | ) | [pure virtual] |
Implemented in de.fu_berlin.inf.dpp.negotiation.IncomingProjectNegotiation, de.fu_berlin.inf.dpp.negotiation.OutgoingProjectNegotiation, de.fu_berlin.inf.dpp.core.invitation.IncomingProjectNegotiation, and de.fu_berlin.inf.dpp.core.invitation.OutgoingProjectNegotiation.
final String de.fu_berlin.inf.dpp.negotiation.ProjectNegotiation.getSessionID | ( | ) |
Returns the ISarosSession session} id this negotiation belongs to.
void de.fu_berlin.inf.dpp.negotiation.ProjectNegotiation.monitorFileTransfer | ( | FileTransfer | transfer, |
IProgressMonitor | monitor | ||
) | throws SarosCancellationException, IOException [protected] |
Monitors a FileTransfer and waits until it is completed or aborted.
transfer | the transfer to monitor |
monitor | the progress monitor that is already initialized to consume 100 ticks to use for reporting progress to the user. It is the caller's responsibility to call done() on the given monitor. Accepts null , indicating that no progress should be reported and that the operation cannot be canceled. |
SarosCancellationException | if the transfer was aborted either on local side or remote side, see also LocalCancellationException and RemoteCancellationException |
IOException | if an I/O error occurred |
void de.fu_berlin.inf.dpp.negotiation.ProjectNegotiation.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.
cancellationCause | the cause of the cancellation |
Implements de.fu_berlin.inf.dpp.negotiation.CancelableProcess.
void de.fu_berlin.inf.dpp.negotiation.ProjectNegotiation.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
listener | to notify |
Implements de.fu_berlin.inf.dpp.negotiation.CancelableProcess.
final String de.fu_berlin.inf.dpp.negotiation.ProjectNegotiation.ARCHIVE_TRANSFER_ID = "saros-dpp-pn-server-client-archive/" [static] |
Prefix part of the id used in the SMACK XMPP file transfer protocol.
XMPPConnectionService de.fu_berlin.inf.dpp.negotiation.ProjectNegotiation.connectionService [protected] |
FileTransferManager de.fu_berlin.inf.dpp.negotiation.ProjectNegotiation.fileTransferManager [protected] |
The file transfer manager can be null
if no connection was established or was lost when the class was instantiated.
final long de.fu_berlin.inf.dpp.negotiation.ProjectNegotiation.PACKET_TIMEOUT [static, protected] |
Long.getLong(
"de.fu_berlin.inf.dpp.negotiation.project.PACKET_TIMEOUT", 30000L)
Timeout for all packet exchanges during the project negotiation
final String de.fu_berlin.inf.dpp.negotiation.ProjectNegotiation.PATH_DELIMITER = ":" [static, protected] |
Delimiter for every Zip entry to delimit the project id from the path entry.
E.g: 12345:foo/bar/foobar.java
final JID de.fu_berlin.inf.dpp.negotiation.ProjectNegotiation.peer [protected] |
VCSProviderFactory de.fu_berlin.inf.dpp.negotiation.ProjectNegotiation.vcsProviderFactory [protected] |