Package org.jdesktop.wonderland.common.cell.messages

Examples of org.jdesktop.wonderland.common.cell.messages.CellMessage


    /** Notify clients that the state has been updated */
    protected void sendUpdate() {
        // send an add component message to all clients. Since the component
        // already exists, this will just update its server state
        CellMessage out = CellClientComponentMessage.newAddMessage(cellID,
                getClientClass(), getClientState(null, null, null));
        cellRef.get().sendCellMessage(null, out);
    }
View Full Code Here


                // no change
                return value;
            }
           
            // send a message to notify all clients
            CellMessage message = ChangeValueMessage.put(getName(), version,
                                                         key, value);
            channelRef.get().sendAll(senderID, message);
            return current;
        }
View Full Code Here

                return null;
            }
           
            version++;

            CellMessage message = ChangeValueMessage.remove(getName(), version,
                                                            key);
            channelRef.get().sendAll(senderID, message);

            // if the map is now empty and there are no listeners,
            // remove it from tha map of maps
View Full Code Here

    public void handleMessage(Message message) {
        if (logger.isLoggable(Level.FINEST)) {
            logger.finest("Handling Message "+message.getClass().getName());
        }
       
        CellMessage cellMessage = (CellMessage)message;
        CellCache cellCache = ClientContext.getCellCache(getSession());
       
        if (cellCache==null) {
            logger.severe("Unable to deliver CellMessage, CellCache is null");
            return;
        }

        // deliver the message to the cell message delivery object for this
        // cell
        getCellMessageDelivery(cellMessage.getCellID()).deliver(cellMessage);
    }
View Full Code Here

                            " delayed messages");
            }

            // loop until the queue is empty
            while (true) {
                CellMessage message;

                // get the first message from the delayed message from the
                // queue while holding the lock on this object.  This prevents
                // new messages from being added while we are checking.
                synchronized (this) {
View Full Code Here

                           cell.getCellID());
            return;
        }

        // TODO throttle sends, we should only send so many times a second.
        final CellMessage req = createMoveRequestMessage(transform);
        final ResponseListener resp = createMoveResponseListener(listener);

        throttle.schedule(new Runnable() {
            public void run() {
                //System.out.println("Sending move at " + System.currentTimeMillis());
View Full Code Here

        public ValueGetter(String propName) {
            this.propName = propName;
        }

        public VersionedValue call() throws InterruptedException {
            CellMessage m = new GetRequestMessage(getName(), propName);
            ResponseMessage rm = channel.sendAndWait(m);
            if (rm instanceof GetResponseMessage) {
                GetResponseMessage grm = (GetResponseMessage) rm;
                return new ImmediateVersionedValue(VersionType.REMOTE,
                                                   grm.getVersion(), grm.getData());
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.common.cell.messages.CellMessage

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.