Package de.fu_berlin.inf.dpp.project.internal.SarosSession

Examples of de.fu_berlin.inf.dpp.project.internal.SarosSession.QueueItem


        if (toSendViaNetwork.isEmpty())
            return;

        this.sendToPeers
            .add(new QueueItem(toSendViaNetwork, queueItem.activity));
    }
View Full Code Here


                continue;
            }

            JupiterActivity transformed = entry.getValue();

            result.add(new QueueItem(to, transformed));
        }
        return result;
    }
View Full Code Here

                continue;
            }

            ChecksumActivity transformed = entry.getValue();

            result.add(new QueueItem(to, transformed));
        }
        return result;
    }
View Full Code Here

            .getRemoteUsersWithReadOnlyAccess();
        final List<User> remoteUsers = sarosSession.getRemoteUsers();
        if (activity instanceof TextEditActivity) {
            TextEditActivity textEdit = (TextEditActivity) activity;

            result.add(new QueueItem(host, jupiterClient.generate(textEdit)));

            /**
             * This activityDataObject still needs to be sent to all users with
             * {@link User.Permission#READONLY_ACCESS}, because they are not
             * notified by receiveJupiterActivityHostSide(...).
             */
            if (sarosSession.isHost()
                && remoteUsersWithReadOnlyAccess.size() > 0) {
                result.add(new QueueItem(remoteUsersWithReadOnlyAccess,
                    activity));
            }
        } else if (activity instanceof ChecksumActivity) {
            ChecksumActivity checksumActivityDataObject = (ChecksumActivity) activity;

            /**
             * Only the host can generate Checksums
             */
            assert sarosSession.isHost();

            // Send Jupiter specific checksum to ConcurrentDocumentServer
            result.add(new QueueItem(host, jupiterClient
                .withTimestamp(checksumActivityDataObject)));

            if (remoteUsersWithReadOnlyAccess.size() > 0)
                /**
                 * Send general checksum to all users with
                 * {@link User.Permission#READONLY_ACCESS}
                 */
                result.add(new QueueItem(remoteUsersWithReadOnlyAccess,
                    checksumActivityDataObject));
        } else {
            if (remoteUsers.size() > 0)
                result.add(new QueueItem(remoteUsers, activity));
        }
        return result;
    }
View Full Code Here

        if (sarosSession.isHost()) {
            List<User> usersWithReadOnlyAccess = sarosSession.getUsersWithReadOnlyAccess();
            usersWithReadOnlyAccess.remove(host);
            if (!usersWithReadOnlyAccess.isEmpty()) {
                for (IActivity activity : result.executeLocally) {
                    result.add(new QueueItem(usersWithReadOnlyAccess, activity));
                }
            }
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of de.fu_berlin.inf.dpp.project.internal.SarosSession.QueueItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.