Class PushConfiguration


  • public class PushConfiguration
    extends Object
    Provides the push configuration stored in the root node with an easier to use API. Additionally tracks when push is enabled/disabled and informs MessageSender.
    Since:
    1.0
    Author:
    Vaadin Ltd
    • Constructor Detail

      • PushConfiguration

        public PushConfiguration​(Registry registry)
        Creates a new instance connected to the given registry.
        Parameters:
        registry - the global registry
    • Method Detail

      • getPushServletMapping

        public String getPushServletMapping()
        Gets the push servlet mapping configured or determined on the server.
        Returns:
        the push servlet mapping configured or determined on the server or null if none has been configured
      • isAlwaysXhrToServer

        public boolean isAlwaysXhrToServer()
        Checks if XHR should be used for client -> server messages even though we are using a bidirectional push transport such as websockets.
        Returns:
        true if XHR should always be used, false otherwise
      • getParameters

        public JsMap<String,​String> getParameters()
        Gets all configured push parameters. The parameters configured on the server, including transports.
        Returns:
        a map of all parameters configured on the server
      • isPushEnabled

        public boolean isPushEnabled()
        Checks if push is enabled.
        Returns:
        true if push is enabled, false otherwise