com.vaadin.flow.internal.nodefeature.

Class PushConfigurationMap

All Implemented Interfaces:

PushConfiguration, Serializable

public class PushConfigurationMap extends NodeMap implements PushConfiguration

Map for storing the push configuration for a UI.

For internal use only. May be renamed or removed in a future release.

Since:

1.0

Author:

Vaadin Ltd

See Also:

  • Field Details

  • Constructor Details

    • PushConfigurationMap

      public PushConfigurationMap(StateNode node)

      Creates a new map for the given node.

      Parameters:

      node - the node that the map belongs to

  • Method Details

    • setTransport

      public void setTransport(Transport transport)

      Description copied from interface: PushConfiguration

      Sets the primary transport type for push.

      Note that the new transport type will not be used until the push channel is disconnected and reconnected if already active.

      Specified by:

      setTransport in interface PushConfiguration

      Parameters:

      transport - The primary transport type

    • getTransport

      public Transport getTransport()

      Description copied from interface: PushConfiguration

      Returns the primary transport type for push.

      Note that if you set the transport type using PushConfiguration.setParameter(String, String) to an unsupported type this method will return null. Supported types are defined by Transport.

      Specified by:

      getTransport in interface PushConfiguration

      Returns:

      The primary transport type

    • setFallbackTransport

      public void setFallbackTransport(Transport fallbackTransport)

      Description copied from interface: PushConfiguration

      Sets the fallback transport type for push.

      Note that the new transport type will not be used until the push channel is disconnected and reconnected if already active.

      Specified by:

      setFallbackTransport in interface PushConfiguration

      Parameters:

      fallbackTransport - The fallback transport type

    • getFallbackTransport

      public Transport getFallbackTransport()

      Description copied from interface: PushConfiguration

      Returns the fallback transport type for push.

      Note that if you set the transport type using PushConfiguration.setParameter(String, String) to an unsupported type this method will return null. Supported types are defined by Transport.

      Specified by:

      getFallbackTransport in interface PushConfiguration

      Returns:

      The fallback transport type

    • setPushServletMapping

      public void setPushServletMapping(String pushServletMapping)

      Description copied from interface: PushConfiguration

      Sets the servlet mapping to use for push requests.

      This is only used when overriding the servlet mapping to use. Setting this to null (the default) will use the default URL.

      Specified by:

      setPushServletMapping in interface PushConfiguration

      Parameters:

      pushServletMapping - The servlet mapping to use for push

    • getPushServletMapping

      public String getPushServletMapping()

      Description copied from interface: PushConfiguration

      Returns the servlet mapping to use for push requests.

      This is only used when overriding the servlet mapping to use. Returns null (the default) when the default URL is used.

      Specified by:

      getPushServletMapping in interface PushConfiguration

      Returns:

      the servlet mapping to use for push requests, or null to use to default

    • setPushMode

      public void setPushMode(PushMode pushMode)

      Description copied from interface: PushConfiguration

      Sets the mode of bidirectional ("push") communication that should be used.

      Add-on developers should note that this method is only meant for the application developer. An add-on should not set the push mode directly, rather instruct the user to set it.

      Specified by:

      setPushMode in interface PushConfiguration

      Parameters:

      pushMode - The push mode to use.

    • getPushMode

      public PushMode getPushMode()

      Description copied from interface: PushConfiguration

      Returns the mode of bidirectional ("push") communication that is used.

      Specified by:

      getPushMode in interface PushConfiguration

      Returns:

      The push mode.

    • getParameter

      public String getParameter(String key)

      Description copied from interface: PushConfiguration

      Returns the given parameter, if set.

      This method provides low level access to push parameters and is typically not needed for normal application development.

      Specified by:

      getParameter in interface PushConfiguration

      Parameters:

      key - The parameter name

      Returns:

      The parameter value or null if not set

    • setParameter

      public void setParameter(String key, String value)

      Description copied from interface: PushConfiguration

      Sets the given parameter.

      This method provides low level access to push parameters and is typically not needed for normal application development.

      Specified by:

      setParameter in interface PushConfiguration

      Parameters:

      key - The parameter name

      value - The value

    • getParameterNames

      public Collection<String> getParameterNames()

      Description copied from interface: PushConfiguration

      Returns the parameters which have been defined.

      Specified by:

      getParameterNames in interface PushConfiguration

      Returns:

      A collection of parameter names

    • setPushConnectionFactory

      public void setPushConnectionFactory(PushConnectionFactory factory)

      Description copied from interface: PushConfiguration

      Sets the factory that will be used to create new instances of PushConnection.

      Specified by:

      setPushConnectionFactory in interface PushConfiguration

      Parameters:

      factory - the factory that will be used to create new instances of PushConnection