public class Heartbeat extends Object
Constructor and Description |
---|
Heartbeat() |
Modifier and Type | Method and Description |
---|---|
protected ApplicationConnection |
getConnection()
Deprecated.
|
int |
getInterval() |
void |
init(ApplicationConnection applicationConnection)
Initializes the heartbeat for the given application connection
|
void |
schedule()
Updates the schedule of the heartbeat to match the set interval.
|
void |
send()
Sends a heartbeat to the server
|
void |
setInterval(int heartbeatInterval)
Changes the heartbeatInterval in runtime and applies it.
|
public void init(ApplicationConnection applicationConnection)
connection
- the connectionpublic void send()
public int getInterval()
public void schedule()
@Deprecated protected ApplicationConnection getConnection()
public void setInterval(int heartbeatInterval)
heartbeatInterval
- new interval in seconds.Copyright © 2019 Vaadin Ltd. All rights reserved.