Package de.xima.fc.gui.common.bean.push
Class BackendPushContextBean
java.lang.Object
de.xima.fc.gui.common.bean.push.BackendPushContextBean
- All Implemented Interfaces:
- Serializable
Bean with the action listener for the 
AjaxCallPushData.getActionListener().- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classKeepalive check for the OmniFaces socket, with a mutex scoped to the current application.static classKeepalive check for the OmniFaces socket, with a mutex scoped to the current session.static classKeepalive check for the OmniFaces socket, with a mutex scoped to the current view.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionlongInterval for the websocket keep alive interval, in milliseconds.longInterval for the websocket keep alive interval, in seconds.voidhandleDefaultAjaxCall(javax.faces.event.ActionEvent event) Action listener called by the default AJAX call push data source.voidHandles the keep alive request for the OmniFaces web socket.
- 
Constructor Details- 
BackendPushContextBeanpublic BackendPushContextBean()
 
- 
- 
Method Details- 
handleDefaultAjaxCallpublic void handleDefaultAjaxCall(javax.faces.event.ActionEvent event) Action listener called by the default AJAX call push data source.- Parameters:
- event- Action event that occurred.
 
- 
handleOmniFacesKeepAliveRequestpublic void handleOmniFacesKeepAliveRequest()Handles the keep alive request for the OmniFaces web socket. The OmniFaces socket is unidirectional, we can only send messages from the server to the server. In additional, we need access to the view scope to send messages. As such, we use the following approach: Each client makes a POSTBACK request regularly in a defined interval, calling this hander method. This method then send a ping message to keep the websocket alive.Note: This handler is invoked in regular intervals by each view scope. That is, when multiple view (from possibly different users) exist, this handler is called many times. We need to ensure that we do not spam users by sending session and application ping messages for each request from a view scope. 
- 
getWebSocketKeepAliveIntervalMillispublic long getWebSocketKeepAliveIntervalMillis()Interval for the websocket keep alive interval, in milliseconds.- Returns:
- The websocket keep alive interval, in milliseconds.
 
- 
getWebSocketKeepAliveIntervalSecondspublic long getWebSocketKeepAliveIntervalSeconds()Interval for the websocket keep alive interval, in seconds.- Returns:
- The websocket keep alive interval, in seconds.
 
 
-