Package com.vaadin.flow.internal
Interface BrowserLiveReload
-
- All Known Implementing Classes:
DebugWindowConnection
public interface BrowserLiveReloadProvides a way to reload browser tabs via web socket connection passed as aAtmosphereResource.For internal use only. May be renamed or removed in a future release.
- Author:
- Vaadin Ltd
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classBrowserLiveReload.BackendLive reload enabling technology detected.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BrowserLiveReload.BackendgetBackend()Detects 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.voidonMessage(org.atmosphere.cpr.AtmosphereResource resource, String msg)Called when any message is received through the connection.voidreload()Requests reload via the resource provided viaonConnect(AtmosphereResource)call.voidsetBackend(BrowserLiveReload.Backend backend)Sets the live reload backend technology explicitly.
-
-
-
Method Detail
-
getBackend
BrowserLiveReload.Backend getBackend()
Detects and return enabling live reload backend technology.- Returns:
- enabling technology, or
nullif none
-
setBackend
void setBackend(BrowserLiveReload.Backend backend)
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.
-
onMessage
void onMessage(org.atmosphere.cpr.AtmosphereResource resource, String msg)Called when any message is received through the connection.- Parameters:
resource- the atmosphere resource that received the messagemsg- the received message
-
-