Package com.vaadin.flow.internal
Interface BrowserLiveReload
- All Superinterfaces:
 FragmentedMessageHolder,Serializable
- All Known Implementing Classes:
 DebugWindowConnection
Provides a way to reload browser tabs via web socket connection passed as a
 
AtmosphereResource.
 For internal use only. May be renamed or removed in a future release.
- Author:
 - Vaadin Ltd
 
- 
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumLive reload enabling technology detected. - 
Method Summary
Modifier and TypeMethodDescriptionDetects and return enabling live reload backend technology.booleanisLiveReload(org.atmosphere.cpr.AtmosphereResource resource) Returns whether the passed connection is a browser live-reload connection.voidonConnect(org.atmosphere.cpr.AtmosphereResource resource) Sets the web socket connection resource when it's established.voidonDisconnect(org.atmosphere.cpr.AtmosphereResource resource) Removes the web socket connection resource, notnull.voidCalled when any message is received through the connection.default voidrefresh(boolean refreshLayouts) Requests a refresh of the current view in the browser, without reloading the whole page.voidreload()Requests reload via the resource provided viaonConnect(AtmosphereResource)call.voidsendHmrEvent(String event, tools.jackson.databind.JsonNode eventData) Send a client side HMR event.voidsetBackend(BrowserLiveReload.Backend backend) Sets the live reload backend technology explicitly.voidRequest an update of the resource with the given path.Methods inherited from interface com.vaadin.flow.server.communication.FragmentedMessageHolder
clearFragmentedMessage, getOrCreateFragmentedMessage 
- 
Method Details
- 
getBackend
BrowserLiveReload.Backend getBackend()Detects and return enabling live reload backend technology.- Returns:
 - enabling technology, or 
nullif none 
 - 
setBackend
Sets the live reload backend technology explicitly.- Parameters:
 backend- enabling technology, notnull.
 - 
onConnect
void onConnect(org.atmosphere.cpr.AtmosphereResource resource) Sets the web socket connection resource when it's established.- Parameters:
 resource- a web socket connection resource, notnull.
 - 
onDisconnect
void onDisconnect(org.atmosphere.cpr.AtmosphereResource resource) Removes the web socket connection resource, notnull.- Parameters:
 resource- a web socket connection resource
 - 
isLiveReload
boolean isLiveReload(org.atmosphere.cpr.AtmosphereResource resource) Returns whether the passed connection is a browser live-reload connection.- Parameters:
 resource- a web socket connection resource, notnull.- Returns:
 - whether the web socket connection is for live reload
 
 - 
reload
void reload()Requests reload via the resource provided viaonConnect(AtmosphereResource)call. - 
refresh
default void refresh(boolean refreshLayouts) Requests a refresh of the current view in the browser, without reloading the whole page.- Parameters:
 refreshLayouts-trueto refresh all layouts in the route chain,falseto only refresh the route component
 - 
update
Request an update of the resource with the given path.- Parameters:
 path- the path of the file to update, relative to the servlet pathcontent- the new content of the file
 - 
onMessage
Called when any message is received through the connection.- Parameters:
 resource- the atmosphere resource that received the messagemsg- the received message
 - 
sendHmrEvent
Send a client side HMR event.- Parameters:
 event- the event nameeventData- the event data
 
 -