Package org.jboss.errai.bus.client

Examples of org.jboss.errai.bus.client.Payload


            }
           
            long startWindow = currentTimeMillis();
            int payLoadSize = 0;

            Payload p = new Payload(m == null ? heartBeat : m);

            if (wait) {
                while (!queue.isEmpty() && payLoadSize < MAXIMUM_PAYLOAD_SIZE
                        && (currentTimeMillis() - startWindow) < transmissionWindow) {
                    p.addMessage(queue.poll());
                    payLoadSize++;
                }

                if ((lastTransmission = currentTimeMillis()) - lastEnqueue > transmissionWindow) {
                    transmissionWindow = (lastTransmission - lastEnqueue);
                } else {
                    transmissionWindow = DEFAULT_TRANSMISSION_WINDOW;
                }
            }

            return p;
        }
        catch (InterruptedException e) {
            return new Payload(heartBeat);
        }
    }
View Full Code Here

TOP

Related Classes of org.jboss.errai.bus.client.Payload

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.