Package org.jdesktop.wonderland.testharness.slave

Examples of org.jdesktop.wonderland.testharness.slave.ProcessingException


        // set up the login system to

        // read the server URL from a property
        String serverURL = props.getProperty("serverURL");
        if (serverURL == null) {
            throw new ProcessingException("No serverURL found");
        }

        // set the login callback to give the right user name
        LoginManager.setLoginUI(new ClientSimLoginUI(username, props));

        // for now, load all plugins.  We should modify this to only load
        // some plugins, depending on the test
        LoginManager.setPluginFilter(new BlacklistPluginFilter());

        // create a fake mainframe
        JmeClientMain.setFrame(new FakeMainFrame());

        try {       
            ServerSessionManager mgr = LoginManager.getSessionManager(serverURL);
            session = mgr.createSession(new SessionCreator<CellClientSession>() {

                public CellClientSession createSession(ServerSessionManager sessionMgr,
                        WonderlandServerInfo serverInfo, ClassLoader loader) {
                    CellClientSession ccs = new CellClientSession(sessionMgr, serverInfo, loader) {

                        @Override
                        protected CellCache createCellCache() {
                            CellCacheBasicImpl impl = new CellCacheBasicImpl(this,
                                    getClassLoader(), getCellCacheConnection(),
                                    getCellChannelConnection()) {

                                @Override
                                protected CellRenderer createCellRenderer(Cell cell) {
                                    return null;
                                }
                            };

                            getCellCacheConnection().addListener(impl);
                            return impl;
                        }
                    };
                    ccs.addSessionStatusListener(Client3DSim.this);

                    final LocalAvatar avatar = ccs.getLocalAvatar();
                    avatar.addViewCellConfiguredListener(new ViewCellConfiguredListener() {

                        public void viewConfigured(LocalAvatar localAvatar) {
//                            MovableComponent mc =
//                                    avatar.getViewCell().getComponent(MovableComponent.class);
//                            mc.addServerCellMoveListener(messageTimer);

                            // start the simulator
                            userSim.start();
                        }
                    });
                    userSim = new UserSimulator(avatar);

                    return ccs;
                }
            });
        } catch (IOException ioe) {
            throw new ProcessingException(ioe);
        } catch (LoginFailureException lfe) {
            lfe.printStackTrace();
            throw new ProcessingException(lfe);
        }
    }
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.testharness.slave.ProcessingException

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.