Package com.ponysdk.core.main

Examples of com.ponysdk.core.main.EntryPoint


        else configurations.addAll(clientConfigurations);

        final ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext(configurations.toArray(new String[0]));

        final EventBus rootEventBus = applicationContext.getBean(EventBus.class);
        final EntryPoint entryPoint = applicationContext.getBean(EntryPoint.class);
        final PHistory history = applicationContext.getBean(PHistory.class);

        ponySession.setRootEventBus(rootEventBus);
        ponySession.setHistory(history);
View Full Code Here


    protected AbstractApplicationManager createApplicationManager() {
        return new AbstractApplicationManager(options) {

            @Override
            protected EntryPoint initializePonySession(final UIContext ponySession) throws ServletException {
                EntryPoint entryPoint = null;
                try {
                    final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
                    final Class<?> clazz = classLoader.loadClass(entryPointClassName);
                    entryPoint = (EntryPoint) clazz.newInstance();
                } catch (final ClassNotFoundException e) {
View Full Code Here

                try {

                    final long receivedSeqNum = data.getLong(APPLICATION.SEQ_NUM);
                    uiContext.updateIncomingSeqNum(receivedSeqNum);

                    final EntryPoint entryPoint = initializePonySession(uiContext);

                    final String historyToken = data.getString(HISTORY.TOKEN);
                    if (historyToken != null && !historyToken.isEmpty()) uiContext.getHistory().newItem(historyToken, false);

                    final PCookies pCookies = uiContext.getCookies();
                    final JSONArray cookies = data.getJSONArray(PROPERTY.COOKIES);
                    for (int i = 0; i < cookies.length(); i++) {
                        final JSONObject jsoObject = cookies.getJSONObject(i);
                        final String name = jsoObject.getString(PROPERTY.KEY);
                        final String value = jsoObject.getString(PROPERTY.VALUE);
                        pCookies.cacheCookie(name, value);
                    }

                    if (isNewHttpSession) {
                        entryPoint.start(uiContext);
                    } else {
                        entryPoint.restart(uiContext);
                    }
                    txn.commit();
                } catch (final Throwable e) {
                    log.error("Cannot send instructions to the browser, Session ID #" + session.getId(), e);
                    txn.rollback();
View Full Code Here

TOP

Related Classes of com.ponysdk.core.main.EntryPoint

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.