@HtmlImport(value="frontend://webapi/online.html") @Tag(value="rap-online") public class Online extends JavascriptTemplate<Online.OnlineTemplateModel>
| Modifier and Type | Class and Description |
|---|---|
static interface |
Online.OnlineTemplateModel |
| Constructor and Description |
|---|
Online(com.vaadin.flow.component.HasElement parent) |
| Modifier and Type | Method and Description |
|---|---|
com.vaadin.flow.shared.Registration |
addOnlineListener(com.vaadin.flow.function.SerializableConsumer<OnlineState> onOnline)
Register an online listener.
|
static void |
getOnlineState(com.vaadin.flow.function.SerializableConsumer<OnlineState> onStateReceived)
Get the current OnLine state of the device (The state can not be retrieved while the client is offline).
|
void |
unregisterAllOnlineListeners()
This method can be used to unregister previously registered onOnLine listeners.
|
clearConsumers, notifyConsumers, registerConsumer, registerConsumer, unregisterAllConsumers, unregisterAllConsumersgetModel, getModelType, getModelType, getStateNode, initModel, isSupportedClassaddListener, fireEvent, from, get, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisiblepublic com.vaadin.flow.shared.Registration addOnlineListener(com.vaadin.flow.function.SerializableConsumer<OnlineState> onOnline)
unregisterAllOnlineListeners().public void unregisterAllOnlineListeners()
#addOnLineListener(Runnable) method.public static void getOnlineState(com.vaadin.flow.function.SerializableConsumer<OnlineState> onStateReceived)
onStateReceived - The callback triggered when the state is received. It consumes the current onLine state.Copyright © 2020 XDEV Software Corp.. All rights reserved.