Package org.jdesktop.wonderland.modules.sharedstate.common.messages

Examples of org.jdesktop.wonderland.modules.sharedstate.common.messages.MapResponseMessage


            SharedMapImpl map = getMap(message.getName(), false);

            // if the map doesn't exist, return an empty message
            if (map == null) {
                List<String> l = Collections.emptyList();
                return new MapResponseMessage(message.getMessageID(), 0, l);
            }

            // create a list of all keys
            Collection<String> keys = new ArrayList<String>(map.keySet());

            logger.fine("[SharedStateComponentMO]: Respond to map req: " +
                        keys.size() + " keys");

            // return the response
            return new MapResponseMessage(message.getMessageID(),
                                          map.getVersion(), keys);

        }
View Full Code Here


     */
    private void doInit() {
        try {
            ResponseMessage rm = channel.sendAndWait(new MapRequestMessage(getName()));
            if (rm instanceof MapResponseMessage) {
                MapResponseMessage mrm = (MapResponseMessage) rm;
                backing.initialize(mrm.getVersion(), mrm.getKeys());
            } else {
                throw new IllegalStateException("Bad response to map request: " +
                                                rm.getClass().getName());
            }

View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.modules.sharedstate.common.messages.MapResponseMessage

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.