/** * Implementation for {@link VaadinSession#access(Command)}. This method is * implemented here instead of in {@link VaadinSession} to enable overriding * the implementation without using a custom subclass of VaadinSession. * * @param session * the vaadin session to access * @param command * the command to run with the session locked * @return a future that can be used to check for task completion and to * cancel the task * @see VaadinSession#access(Command) */ public Future<Void> accessSession(VaadinSession session, Command command) { FutureAccess future = new FutureAccess(session, command); session.getPendingAccessQueue().add(future); ensureAccessQueuePurged(session); return future; }
getService().ensureAccessQueuePurged(this);