Package com.vaadin.mpr.core
Interface LegacyCurrentInstance
public interface LegacyCurrentInstance
A facade type of interface to hide the differences of the v7 and v8
CurrentInstance implementation.-
Method Summary
Modifier and TypeMethodDescriptionvoidclearAll()Clears all current instances.Get the all current instances.voidrestoreInstances(Map<Class<?>, com.vaadin.util.CurrentInstance> previousInstances) Restores the given instances to the given values.
-
Method Details
-
getCurrentInstances
Get the all current instances.This method is implemented in different ways for Vaadin 7 and Vaadin 8 to deal with API differences caused by dropping support for inheritable thread locals.
- Returns:
- a map from instance type to instance
-
clearAll
void clearAll()Clears all current instances. -
restoreInstances
Restores the given instances to the given values. Note that this should only be used internally to restore Vaadin classes.- Parameters:
previousInstances- A Class-to-CurrentInstance map to set as current instances
-