Examples of FutureAccess


Examples of com.vaadin.server.VaadinSession.FutureAccess

     *
     * @return a future that can be used to check for task completion and to
     *         cancel the task
     */
    public Future<Void> accessSession(VaadinSession session, Runnable runnable) {
        FutureAccess future = new FutureAccess(session, runnable);
        session.getPendingAccessQueue().add(future);

        ensureAccessQueuePurged(session);

        return future;
View Full Code Here

Examples of com.vaadin.server.VaadinSession.FutureAccess

        }

        Map<Class<?>, CurrentInstance> oldInstances = CurrentInstance
                .getInstances(false);

        FutureAccess pendingAccess;
        try {
            while ((pendingAccess = session.getPendingAccessQueue().poll()) != null) {
                if (!pendingAccess.isCancelled()) {
                    CurrentInstance.clearAll();
                    CurrentInstance.restoreInstances(pendingAccess
                            .getCurrentInstances());
                    CurrentInstance.setCurrent(session);
                    pendingAccess.run();

                    try {
                        pendingAccess.get();

                    } catch (Exception exception) {
                        pendingAccess.handleError(exception);
                    }
                }
            }
        } finally {
            CurrentInstance.clearAll();
View Full Code Here

Examples of com.vaadin.server.VaadinSession.FutureAccess

     *
     * @return a future that can be used to check for task completion and to
     *         cancel the task
     */
    public Future<Void> accessSession(VaadinSession session, Runnable runnable) {
        FutureAccess future = new FutureAccess(session, runnable);
        session.getPendingAccessQueue().add(future);

        ensureAccessQueuePurged(session);

        return future;
View Full Code Here

Examples of com.vaadin.server.VaadinSession.FutureAccess

        }

        Map<Class<?>, CurrentInstance> oldInstances = CurrentInstance
                .getInstances(false);

        FutureAccess pendingAccess;
        try {
            while ((pendingAccess = session.getPendingAccessQueue().poll()) != null) {
                if (!pendingAccess.isCancelled()) {
                    CurrentInstance.clearAll();
                    CurrentInstance.restoreInstances(pendingAccess
                            .getCurrentInstances());
                    CurrentInstance.setCurrent(session);
                    pendingAccess.run();

                    try {
                        pendingAccess.get();

                    } catch (Exception exception) {
                        pendingAccess.handleError(exception);
                    }
                }
            }
        } finally {
            CurrentInstance.clearAll();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.