Search in sources :

Example 6 with BrowserLiveReload

use of com.vaadin.flow.internal.BrowserLiveReload in project flow by vaadin.

the class JavaLiveReloadView method handleClickJavaLiveReload.

// Java triggered live reload is faked as we do not have Trava JDK in test
private void handleClickJavaLiveReload(ClickEvent<?> event) {
    BrowserLiveReloadAccess liveReloadAccess = VaadinService.getCurrent().getInstantiator().getOrCreate(BrowserLiveReloadAccess.class);
    BrowserLiveReload browserLiveReload = liveReloadAccess.getLiveReload(VaadinService.getCurrent());
    browserLiveReload.reload();
}
Also used : BrowserLiveReloadAccess(com.vaadin.flow.internal.BrowserLiveReloadAccess) BrowserLiveReload(com.vaadin.flow.internal.BrowserLiveReload)

Aggregations

BrowserLiveReload (com.vaadin.flow.internal.BrowserLiveReload)6 VaadinContext (com.vaadin.flow.server.VaadinContext)3 VaadinService (com.vaadin.flow.server.VaadinService)2 AtmosphereResource (org.atmosphere.cpr.AtmosphereResource)2 Test (org.junit.Test)2 UI (com.vaadin.flow.component.UI)1 Lookup (com.vaadin.flow.di.Lookup)1 DeploymentConfiguration (com.vaadin.flow.function.DeploymentConfiguration)1 BrowserLiveReloadAccess (com.vaadin.flow.internal.BrowserLiveReloadAccess)1 BrowserLiveReloadAccessor (com.vaadin.flow.internal.BrowserLiveReloadAccessor)1 MockVaadinServletService (com.vaadin.flow.server.MockVaadinServletService)1 SessionExpiredException (com.vaadin.flow.server.SessionExpiredException)1 VaadinServletRequest (com.vaadin.flow.server.VaadinServletRequest)1 VaadinSession (com.vaadin.flow.server.VaadinSession)1 InvalidUIDLSecurityKeyException (com.vaadin.flow.server.communication.ServerRpcHandler.InvalidUIDLSecurityKeyException)1 ApplicationConfiguration (com.vaadin.flow.server.startup.ApplicationConfiguration)1 PushMode (com.vaadin.flow.shared.communication.PushMode)1 MockDeploymentConfiguration (com.vaadin.tests.util.MockDeploymentConfiguration)1 JsonException (elemental.json.JsonException)1 IOException (java.io.IOException)1