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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidregisterInstrumentedRoute(Class<? extends Component> navigationTarget) Registers an instrumented route for the given navigation target.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.server.VaadinServiceInitListener
serviceInit
-
Constructor Details
-
InstrumentationViewInitializer
public InstrumentationViewInitializer()
-
-
Method Details
-
registerInstrumentedRoute
Registers an instrumented route for the given navigation target. The navigation target must be annotated withInstrumentedRouteto specify the route path. This method callsJsonMigration.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 withInstrumentedRoute- Throws:
IllegalArgumentException- if the navigationTarget is not annotated withInstrumentedRoute
-