Package org.richfaces.application.push

Examples of org.richfaces.application.push.MessageData


     */
    @Override
    public void clearBroadcastedMessages(long sequenceNumber) {
        Queue<MessageData> queue = messagesQueue;
        while (true) {
            MessageData message = queue.peek();
            if (message == null || sequenceNumber < message.getSequenceNumber()) {
                break;
            }

            queue.remove();
        }
View Full Code Here


     *
     * @see org.richfaces.application.push.Session#push(org.richfaces.application.push.TopicKey, java.lang.String)
     */
    @Override
    public void push(TopicKey topicKey, String serializedData) {
        MessageData serializedMessage = new MessageData(topicKey, serializedData, sequenceCounter.getAndIncrement());
        messagesQueue.add(serializedMessage);
        synchronized (this) {
            if (request != null) {
                request.postMessages();
            }
View Full Code Here

    public void appendScript(Appendable target) throws IOException {
        Iterator<MessageData> iterator = messages.iterator();

        while (iterator.hasNext()) {
            MessageData message = iterator.next();

            appendMessageToScript(message, target);

            // TODO - synchronization aids?
            lastMessageNumber = message.getSequenceNumber();
        }
    }
View Full Code Here

TOP

Related Classes of org.richfaces.application.push.MessageData

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.