public class PushConfigurationMap extends NodeMap implements PushConfiguration
Modifier and Type | Class and Description |
---|---|
static class |
PushConfigurationMap.PushConfigurationParametersMap
Map for storing push parameters.
|
Modifier and Type | Field and Description |
---|---|
static String |
ALWAYS_USE_XHR_TO_SERVER |
static String |
FALLBACK_TRANSPORT_KEY |
static String |
PARAMETERS_KEY |
static String |
PUSH_URL_KEY |
static String |
PUSHMODE_KEY |
static String |
TRANSPORT_KEY |
Constructor and Description |
---|
PushConfigurationMap(StateNode node)
Creates a new map for the given node.
|
Modifier and Type | Method and Description |
---|---|
Transport |
getFallbackTransport()
Returns the fallback transport type for push.
|
String |
getParameter(String key)
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 key,
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 |
setPushUrl(String pushUrl)
Sets the URL to use for push requests.
|
void |
setTransport(Transport transport)
Sets the primary transport type for push.
|
clear, collectChanges, contains, forEachChild, generateChangesFromEmpty, get, getOrDefault, getOrDefault, getOrDefault, keySet, mayUpdateFromClient, put, put, remove, updateFromClient
allowsChanges, attachPotentialChild, detatchPotentialChild, getNode, onAttach, onDetach
public static final String TRANSPORT_KEY
public static final String FALLBACK_TRANSPORT_KEY
public static final String PUSHMODE_KEY
public static final String ALWAYS_USE_XHR_TO_SERVER
public static final String PUSH_URL_KEY
public static final String PARAMETERS_KEY
public PushConfigurationMap(StateNode node)
node
- the node that the map belongs topublic void setTransport(Transport transport)
PushConfiguration
Note that the new transport type will not be used until the push channel is disconnected and reconnected if already active.
setTransport
in interface PushConfiguration
transport
- The primary transport typepublic Transport getTransport()
PushConfiguration
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
.
getTransport
in interface PushConfiguration
public void setFallbackTransport(Transport fallbackTransport)
PushConfiguration
Note that the new transport type will not be used until the push channel is disconnected and reconnected if already active.
setFallbackTransport
in interface PushConfiguration
fallbackTransport
- The fallback transport typepublic Transport getFallbackTransport()
PushConfiguration
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
.
getFallbackTransport
in interface PushConfiguration
public void setPushMode(PushMode pushMode)
PushConfiguration
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.
setPushMode
in interface PushConfiguration
pushMode
- The push mode to use.public PushMode getPushMode()
PushConfiguration
getPushMode
in interface PushConfiguration
public void setPushUrl(String pushUrl)
PushConfiguration
This is only used when overriding the URL to use. Setting this to null (the default) will use the default URL.
setPushUrl
in interface PushConfiguration
pushUrl
- The push URL to usepublic String getPushUrl()
PushConfiguration
This is only used when overriding the URL to use. Returns null (the default) when the default URL is used.
getPushUrl
in interface PushConfiguration
public String getParameter(String key)
PushConfiguration
This method provides low level access to push parameters and is typically not needed for normal application development.
getParameter
in interface PushConfiguration
key
- The parameter namepublic void setParameter(String key, String value)
PushConfiguration
This method provides low level access to push parameters and is typically not needed for normal application development.
setParameter
in interface PushConfiguration
key
- The parameter namevalue
- The valuepublic Collection<String> getParameterNames()
PushConfiguration
getParameterNames
in interface PushConfiguration
public void setPushConnectionFactory(PushConnectionFactory factory)
PushConfiguration
PushConnection
.setPushConnectionFactory
in interface PushConfiguration
factory
- the factory that will be used to create new instances of PushConnection
Copyright © 2018. All rights reserved.