Package com.vaadin.server
Class VaadinSession.FutureAccess
- java.lang.Object
-
- java.util.concurrent.FutureTask<Void>
-
- com.vaadin.server.VaadinSession.FutureAccess
-
- All Implemented Interfaces:
Runnable,Future<Void>,RunnableFuture<Void>
- Enclosing class:
- VaadinSession
public static class VaadinSession.FutureAccess extends FutureTask<Void>
Encapsulates aRunnablesubmitted usingVaadinSession.access(Runnable). This class is used internally by the framework and is not intended to be directly used by application developers.- Since:
- 7.1
- Author:
- Vaadin Ltd
-
-
Constructor Summary
Constructors Constructor Description FutureAccess(VaadinSession session, Runnable runnable)Creates an instance for the given runnable
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Voidget()Map<Class<?>,CurrentInstance>getCurrentInstances()Gets the current instance values that should be used when running this task.voidhandleError(Exception exception)Handles exceptions thrown during the execution of this task.-
Methods inherited from class java.util.concurrent.FutureTask
cancel, done, get, isCancelled, isDone, run, runAndReset, set, setException
-
-
-
-
Constructor Detail
-
FutureAccess
public FutureAccess(VaadinSession session, Runnable runnable)
Creates an instance for the given runnable- Parameters:
session- the session to which the task belongsrunnable- the runnable to run when this task is purged from the queue
-
-
Method Detail
-
get
public Void get() throws InterruptedException, ExecutionException
- Specified by:
getin interfaceFuture<Void>- Overrides:
getin classFutureTask<Void>- Throws:
InterruptedExceptionExecutionException
-
getCurrentInstances
public Map<Class<?>,CurrentInstance> getCurrentInstances()
Gets the current instance values that should be used when running this task.- Returns:
- a map of current instances.
- See Also:
CurrentInstance.restoreInstances(Map)
-
handleError
public void handleError(Exception exception)
Handles exceptions thrown during the execution of this task.- Parameters:
exception- the thrown exception.- Since:
- 7.1.8
-
-