Class InstrumentationViewInitializer

java.lang.Object
com.flowingcode.vaadin.jsonmigration.InstrumentationViewInitializer
All Implemented Interfaces:
VaadinServiceInitListener, Serializable, EventListener

public abstract class InstrumentationViewInitializer extends Object implements VaadinServiceInitListener
Abstract base class for Vaadin service initializers that register instrumented views. Subclasses should implement VaadinServiceInitListener.serviceInit(com.vaadin.flow.server.ServiceInitEvent) and call registerInstrumentedRoute(Class) to register views with instrumented routes.
Author:
Javier Godoy / Flowing Code
See Also:
  • Constructor Details

    • InstrumentationViewInitializer

      public InstrumentationViewInitializer()
  • Method Details

    • registerInstrumentedRoute

      protected final void registerInstrumentedRoute(Class<? extends Component> navigationTarget)
      Registers an instrumented route for the given navigation target. The navigation target must be annotated with InstrumentedRoute to specify the route path. This method calls JsonMigration.instrumentClass(Class) to get the instrumented class and registers it as a Vaadin view with the route derived from the annotation.
      Parameters:
      navigationTarget - the component class to instrument and register, must be annotated with InstrumentedRoute
      Throws:
      IllegalArgumentException - if the navigationTarget is not annotated with InstrumentedRoute