Interface PushConfiguration

All Superinterfaces:
Serializable
All Known Implementing Classes:
PushConfigurationMap

public interface PushConfiguration extends Serializable
Provides method for configuring the push channel.
Since:
1.0
Author:
Vaadin Ltd
  • Method Details

    • getPushMode

      PushMode getPushMode()
      Returns the mode of bidirectional ("push") communication that is used.
      Returns:
      The push mode.
    • setPushMode

      void setPushMode(PushMode pushMode)
      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.

      Parameters:
      pushMode - The push mode to use.
      Throws:
      IllegalArgumentException - if the argument is null.
      IllegalStateException - if push support is not available.
    • setPushServletMapping

      void setPushServletMapping(String pushServletMapping)
      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.

      Parameters:
      pushServletMapping - The servlet mapping to use for push
    • getPushServletMapping

      String getPushServletMapping()
      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.

      Returns:
      the servlet mapping to use for push requests, or null to use to default
    • getTransport

      Transport getTransport()
      Returns the primary transport type for push.

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

      Returns:
      The primary transport type
    • setTransport

      void setTransport(Transport transport)
      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.

      Parameters:
      transport - The primary transport type
    • getFallbackTransport

      Transport getFallbackTransport()
      Returns the fallback transport type for push.

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

      Returns:
      The fallback transport type
    • setFallbackTransport

      void setFallbackTransport(Transport fallbackTransport)
      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.

      Parameters:
      fallbackTransport - The fallback transport type
    • getParameter

      String getParameter(String parameter)
      Returns the given parameter, if set.

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

      Parameters:
      parameter - The parameter name
      Returns:
      The parameter value or null if not set
    • getParameterNames

      Collection<String> getParameterNames()
      Returns the parameters which have been defined.
      Returns:
      A collection of parameter names
    • setParameter

      void setParameter(String parameter, String value)
      Sets the given parameter.

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

      Parameters:
      parameter - The parameter name
      value - The value
    • setPushConnectionFactory

      void setPushConnectionFactory(PushConnectionFactory factory)
      Sets the factory that will be used to create new instances of PushConnection.
      Parameters:
      factory - the factory that will be used to create new instances of PushConnection