Package org.opencms.gwt.client
Class CmsBroadcastTimer
- java.lang.Object
-
- org.opencms.gwt.client.CmsBroadcastTimer
-
public class CmsBroadcastTimer extends java.lang.Object
A timer which sends an RPC call regularly to keep the session alive and receive workplace broadcasts.- Since:
- 9.5.0
-
-
Field Summary
Fields Modifier and Type Field Description static int
PING_INTERVAL
The interval for the RPC calls.
-
Constructor Summary
Constructors Constructor Description CmsBroadcastTimer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
abort()
Aborts the timer.protected java.lang.String
createMessageHtml(org.opencms.gwt.shared.CmsBroadcastMessage message)
Generates the HTML for a single broadcast message.protected void
run()
Installs the timer which fires the RPC calls.protected static boolean
shouldKeepRunning()
Returns if the timer should keep running.static void
start()
Starts the timer.
-
-
-
Field Detail
-
PING_INTERVAL
public static final int PING_INTERVAL
The interval for the RPC calls.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsBroadcastTimer
public CmsBroadcastTimer()
-
-
Method Detail
-
abort
public static void abort()
Aborts the timer.
-
start
public static void start()
Starts the timer.
-
shouldKeepRunning
protected static boolean shouldKeepRunning()
Returns if the timer should keep running.- Returns:
true
if the ping timer should keep running
-
createMessageHtml
protected java.lang.String createMessageHtml(org.opencms.gwt.shared.CmsBroadcastMessage message)
Generates the HTML for a single broadcast message.- Parameters:
message
- the message- Returns:
- the HTML string
-
run
protected void run()
Installs the timer which fires the RPC calls.
-
-