public class PNConfiguration
extends java.lang.Object
| Constructor and Description |
|---|
PNConfiguration()
Initialize the PNConfiguration with default values
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAuthKey() |
okhttp3.CertificatePinner |
getCertificatePinner() |
java.lang.String |
getCipherKey() |
okhttp3.ConnectionSpec |
getConnectionSpec() |
int |
getConnectTimeout()
Stores the maximum number of seconds which the client should wait for connection before timing out.
|
java.lang.String |
getFilterExpression()
filterExpression used as part of PSV2 specification.
|
int |
getHeartbeatInterval()
In seconds, How often the client should announce it's existence via heartbeating.
|
PNHeartbeatNotificationOptions |
getHeartbeatNotificationOptions()
verbosity of heartbeat configuration, by default only alerts on failed heartbeats
|
javax.net.ssl.HostnameVerifier |
getHostnameVerifier() |
okhttp3.logging.HttpLoggingInterceptor |
getHttpLoggingInterceptor() |
PNLogVerbosity |
getLogVerbosity()
toggle to enable verbose logging.
|
java.lang.Integer |
getMaximumConnections() |
java.lang.Integer |
getMaximumMessagesCacheSize() |
int |
getMaximumReconnectionRetries()
Set how many times the reconneciton manager will try to connect before giving app
|
int |
getNonSubscribeRequestTimeout()
Reference on number of seconds which is used by client during non-subscription operations to
check whether response potentially failed with 'timeout' or not.
|
java.lang.String |
getOrigin()
By default, the origin is pointing directly to PubNub servers.
|
int |
getPresenceTimeout()
In seconds, how long the server will consider this client to be online before issuing a leave event.
|
java.net.Proxy |
getProxy()
Proxy configuration which will be passed to the networking layer.
|
okhttp3.Authenticator |
getProxyAuthenticator() |
java.net.ProxySelector |
getProxySelector() |
java.lang.String |
getPublishKey()
Publish Key provided by PubNub.
|
PNReconnectionPolicy |
getReconnectionPolicy()
Reconnection policy which will be used if/when networking goes down
|
java.lang.Integer |
getRequestMessageCountThreshold()
if set, the SDK will alert once the number of messages arrived in one call equal to the threshold
|
java.lang.String |
getSecretKey() |
javax.net.ssl.SSLSocketFactory |
getSslSocketFactory() |
java.lang.String |
getSubscribeKey()
Subscribe Key provided by PubNub
|
int |
getSubscribeTimeout() |
java.lang.String |
getUuid() |
javax.net.ssl.X509ExtendedTrustManager |
getX509ExtendedTrustManager() |
boolean |
isCacheBusting()
Deprecated.
|
boolean |
isDedupOnSubscribe() |
boolean |
isGoogleAppEngineNetworking()
Use Google App Engine based networking configuration
|
boolean |
isIncludeInstanceIdentifier()
Set to true to send a UUID for PubNub instance
|
boolean |
isIncludeRequestIdentifier()
Set to true to send a UUID on each request
|
boolean |
isSecure()
set to true to switch the client to HTTPS:// based communications.
|
boolean |
isStartSubscriberThread() |
boolean |
isSupressLeaveEvents()
Supress leave events when a channel gets disconnected
|
PNConfiguration |
setAuthKey(java.lang.String authKey) |
PNConfiguration |
setCacheBusting(boolean cacheBusting)
Deprecated.
|
PNConfiguration |
setCertificatePinner(okhttp3.CertificatePinner certificatePinner) |
PNConfiguration |
setCipherKey(java.lang.String cipherKey) |
PNConfiguration |
setConnectionSpec(okhttp3.ConnectionSpec connectionSpec) |
PNConfiguration |
setConnectTimeout(int connectTimeout)
Stores the maximum number of seconds which the client should wait for connection before timing out.
|
PNConfiguration |
setDedupOnSubscribe(boolean dedupOnSubscribe) |
PNConfiguration |
setFilterExpression(java.lang.String filterExpression)
filterExpression used as part of PSV2 specification.
|
PNConfiguration |
setGoogleAppEngineNetworking(boolean googleAppEngineNetworking)
Use Google App Engine based networking configuration
|
PNConfiguration |
setHeartbeatNotificationOptions(PNHeartbeatNotificationOptions heartbeatNotificationOptions)
verbosity of heartbeat configuration, by default only alerts on failed heartbeats
|
PNConfiguration |
setHostnameVerifier(javax.net.ssl.HostnameVerifier hostnameVerifier) |
PNConfiguration |
setHttpLoggingInterceptor(okhttp3.logging.HttpLoggingInterceptor httpLoggingInterceptor) |
PNConfiguration |
setIncludeInstanceIdentifier(boolean includeInstanceIdentifier)
Set to true to send a UUID for PubNub instance
|
PNConfiguration |
setIncludeRequestIdentifier(boolean includeRequestIdentifier)
Set to true to send a UUID on each request
|
PNConfiguration |
setLogVerbosity(PNLogVerbosity logVerbosity)
toggle to enable verbose logging.
|
PNConfiguration |
setMaximumConnections(java.lang.Integer maximumConnections) |
PNConfiguration |
setMaximumMessagesCacheSize(java.lang.Integer maximumMessagesCacheSize) |
PNConfiguration |
setMaximumReconnectionRetries(int maximumReconnectionRetries)
Set how many times the reconneciton manager will try to connect before giving app
|
PNConfiguration |
setNonSubscribeRequestTimeout(int nonSubscribeRequestTimeout)
Reference on number of seconds which is used by client during non-subscription operations to
check whether response potentially failed with 'timeout' or not.
|
PNConfiguration |
setOrigin(java.lang.String origin)
By default, the origin is pointing directly to PubNub servers.
|
PNConfiguration |
setPresenceTimeout(int timeout)
set presence configurations for timeout and allow the client to pick the best interval
|
PNConfiguration |
setPresenceTimeoutWithCustomInterval(int timeout,
int interval)
set presence configurations for timeout and announce interval.
|
PNConfiguration |
setProxy(java.net.Proxy proxy)
Proxy configuration which will be passed to the networking layer.
|
PNConfiguration |
setProxyAuthenticator(okhttp3.Authenticator proxyAuthenticator) |
PNConfiguration |
setProxySelector(java.net.ProxySelector proxySelector) |
PNConfiguration |
setPublishKey(java.lang.String publishKey)
Publish Key provided by PubNub.
|
PNConfiguration |
setReconnectionPolicy(PNReconnectionPolicy reconnectionPolicy)
Reconnection policy which will be used if/when networking goes down
|
PNConfiguration |
setRequestMessageCountThreshold(java.lang.Integer requestMessageCountThreshold)
if set, the SDK will alert once the number of messages arrived in one call equal to the threshold
|
PNConfiguration |
setSecretKey(java.lang.String secretKey) |
PNConfiguration |
setSecure(boolean secure)
set to true to switch the client to HTTPS:// based communications.
|
PNConfiguration |
setSslSocketFactory(javax.net.ssl.SSLSocketFactory sslSocketFactory) |
PNConfiguration |
setStartSubscriberThread(boolean startSubscriberThread) |
PNConfiguration |
setSubscribeKey(java.lang.String subscribeKey)
Subscribe Key provided by PubNub
|
PNConfiguration |
setSubscribeTimeout(int subscribeTimeout) |
PNConfiguration |
setSupressLeaveEvents(boolean supressLeaveEvents)
Supress leave events when a channel gets disconnected
|
PNConfiguration |
setUuid(java.lang.String uuid) |
PNConfiguration |
setX509ExtendedTrustManager(javax.net.ssl.X509ExtendedTrustManager x509ExtendedTrustManager) |
public PNConfiguration()
public PNConfiguration setPresenceTimeoutWithCustomInterval(int timeout, int interval)
timeout - presence timeout; how long before the server considers this client to be gone.interval - presence announce interval, how often the client should announce itself.public PNConfiguration setPresenceTimeout(int timeout)
timeout - presence timeout; how long before the server considers this client to be gone.public java.lang.String getOrigin()
public int getSubscribeTimeout()
public int getPresenceTimeout()
public int getHeartbeatInterval()
public boolean isSecure()
public java.lang.String getSubscribeKey()
public java.lang.String getPublishKey()
public java.lang.String getSecretKey()
public java.lang.String getCipherKey()
public java.lang.String getAuthKey()
public java.lang.String getUuid()
@Deprecated public boolean isCacheBusting()
public PNLogVerbosity getLogVerbosity()
public int getConnectTimeout()
public int getNonSubscribeRequestTimeout()
public boolean isSupressLeaveEvents()
public PNHeartbeatNotificationOptions getHeartbeatNotificationOptions()
public java.lang.String getFilterExpression()
public PNReconnectionPolicy getReconnectionPolicy()
public int getMaximumReconnectionRetries()
public java.net.Proxy getProxy()
public java.net.ProxySelector getProxySelector()
public okhttp3.Authenticator getProxyAuthenticator()
public okhttp3.CertificatePinner getCertificatePinner()
public java.lang.Integer getMaximumConnections()
public okhttp3.logging.HttpLoggingInterceptor getHttpLoggingInterceptor()
public java.lang.Integer getRequestMessageCountThreshold()
public boolean isGoogleAppEngineNetworking()
public boolean isStartSubscriberThread()
public boolean isDedupOnSubscribe()
public java.lang.Integer getMaximumMessagesCacheSize()
public PNConfiguration setSslSocketFactory(javax.net.ssl.SSLSocketFactory sslSocketFactory)
public PNConfiguration setX509ExtendedTrustManager(javax.net.ssl.X509ExtendedTrustManager x509ExtendedTrustManager)
public PNConfiguration setConnectionSpec(okhttp3.ConnectionSpec connectionSpec)
public PNConfiguration setHostnameVerifier(javax.net.ssl.HostnameVerifier hostnameVerifier)
public PNConfiguration setIncludeInstanceIdentifier(boolean includeInstanceIdentifier)
public PNConfiguration setIncludeRequestIdentifier(boolean includeRequestIdentifier)
public PNConfiguration setOrigin(java.lang.String origin)
public PNConfiguration setSubscribeTimeout(int subscribeTimeout)
public PNConfiguration setSecure(boolean secure)
public PNConfiguration setSubscribeKey(java.lang.String subscribeKey)
public PNConfiguration setPublishKey(java.lang.String publishKey)
public PNConfiguration setSecretKey(java.lang.String secretKey)
public PNConfiguration setCipherKey(java.lang.String cipherKey)
public PNConfiguration setAuthKey(java.lang.String authKey)
public PNConfiguration setUuid(java.lang.String uuid)
@Deprecated public PNConfiguration setCacheBusting(boolean cacheBusting)
public PNConfiguration setLogVerbosity(PNLogVerbosity logVerbosity)
public PNConfiguration setConnectTimeout(int connectTimeout)
public PNConfiguration setNonSubscribeRequestTimeout(int nonSubscribeRequestTimeout)
public PNConfiguration setSupressLeaveEvents(boolean supressLeaveEvents)
public PNConfiguration setHeartbeatNotificationOptions(PNHeartbeatNotificationOptions heartbeatNotificationOptions)
public PNConfiguration setRequestMessageCountThreshold(java.lang.Integer requestMessageCountThreshold)
public javax.net.ssl.SSLSocketFactory getSslSocketFactory()
public javax.net.ssl.X509ExtendedTrustManager getX509ExtendedTrustManager()
public okhttp3.ConnectionSpec getConnectionSpec()
public javax.net.ssl.HostnameVerifier getHostnameVerifier()
public boolean isIncludeInstanceIdentifier()
public boolean isIncludeRequestIdentifier()
public PNConfiguration setFilterExpression(java.lang.String filterExpression)
public PNConfiguration setReconnectionPolicy(PNReconnectionPolicy reconnectionPolicy)
public PNConfiguration setMaximumReconnectionRetries(int maximumReconnectionRetries)
public PNConfiguration setProxy(java.net.Proxy proxy)
public PNConfiguration setProxySelector(java.net.ProxySelector proxySelector)
public PNConfiguration setProxyAuthenticator(okhttp3.Authenticator proxyAuthenticator)
public PNConfiguration setCertificatePinner(okhttp3.CertificatePinner certificatePinner)
public PNConfiguration setMaximumConnections(java.lang.Integer maximumConnections)
public PNConfiguration setHttpLoggingInterceptor(okhttp3.logging.HttpLoggingInterceptor httpLoggingInterceptor)
public PNConfiguration setGoogleAppEngineNetworking(boolean googleAppEngineNetworking)
public PNConfiguration setStartSubscriberThread(boolean startSubscriberThread)
public PNConfiguration setDedupOnSubscribe(boolean dedupOnSubscribe)
public PNConfiguration setMaximumMessagesCacheSize(java.lang.Integer maximumMessagesCacheSize)