com.vaadin.flow.component.
Interface PushConfiguration
-
All Superinterfaces:
All Known Implementing Classes:
public interface PushConfiguration extends Serializable
Provides method for configuring the push channel.
Since:
1.0
Author:
Vaadin Ltd
-
-
Method Summary
All Methods Modifier and Type Method Description Transport
getFallbackTransport()
Returns the fallback transport type for push.
String
getParameter(String parameter)
Returns the given parameter, if set.
Collection<String>
getParameterNames()
Returns the parameters which have been defined.
PushMode
getPushMode()
Returns the mode of bidirectional ("push") communication that is used.
Transport
getTransport()
Returns the primary transport type for push.
void
setFallbackTransport(Transport fallbackTransport)
Sets the fallback transport type for push.
void
setParameter(String parameter, String value)
Sets the given parameter.
void
setPushConnectionFactory(PushConnectionFactory factory)
Sets the factory that will be used to create new instances of
PushConnection
.void
setPushMode(PushMode pushMode)
Sets the mode of bidirectional ("push") communication that should be used.
void
setTransport(Transport transport)
Sets the primary transport type for push.
-
-
-
Method Detail
-
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.
-
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 byTransport
.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 byTransport
.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 nameReturns:
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 namevalue
- 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 ofPushConnection
-
-