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 Type
    Method
    Description
    void
    Clears all current instances.
    Map<Class<?>,com.vaadin.util.CurrentInstance>
    Get the all current instances.
    void
    restoreInstances(Map<Class<?>,com.vaadin.util.CurrentInstance> previousInstances)
    Restores the given instances to the given values.
  • Method Details

    • getCurrentInstances

      Map<Class<?>,com.vaadin.util.CurrentInstance> 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

      void restoreInstances(Map<Class<?>,com.vaadin.util.CurrentInstance> previousInstances)
      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