com.vaadin.ui.
Interface PushConfiguration
-
All Superinterfaces:
public interface PushConfiguration extends Serializable
Provides method for configuring the push channel.
Since:
7.1
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.
String
getPushUrl()
Returns the URL to use for push requests.
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
setPushMode(PushMode pushMode)
Sets the mode of bidirectional ("push") communication that should be used.
void
setPushUrl(String pushUrl)
Sets the URL to use for push requests.
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
Since:
7.1
-
getParameterNames
Collection<String> getParameterNames()
Returns the parameters which have been defined.
Returns:
A collection of parameter names
Since:
7.1
-
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 valueSince:
7.1
-
setPushUrl
void setPushUrl(String pushUrl)
Sets the URL to use for push requests.
This is only used when overriding the URL to use. Setting this to null (the default) will use the default URL.
Parameters:
pushUrl
- The push URL to useSince:
7.6
-
getPushUrl
String getPushUrl()
Returns the URL to use for push requests.
This is only used when overriding the URL to use. Returns null (the default) when the default URL is used.
Returns:
the URL to use for push requests, or null to use to default
Since:
7.6
-
-