Modifier and Type | Field and Description |
---|---|
static String |
LIB_VERSION |
Constructor and Description |
---|
PusherOptions() |
Modifier and Type | Method and Description |
---|---|
String |
buildUrl(String apiKey)
Construct the URL for the WebSocket connection based on the options
previous set on this object and the provided API key
|
long |
getActivityTimeout() |
Authorizer |
getAuthorizer()
Gets the authorizer to be used when authenticating private and presence
channels.
|
long |
getPongTimeout() |
boolean |
isEncrypted()
Gets whether an encrypted (SSL) connection should be used when connecting
to Pusher.
|
PusherOptions |
setActivityTimeout(long activityTimeout)
The number of milliseconds of inactivity at which a "ping" will be
triggered to check the connection.
|
PusherOptions |
setAuthorizer(Authorizer authorizer)
Sets the authorizer to be used when authenticating private and presence
channels.
|
PusherOptions |
setCluster(String cluster) |
PusherOptions |
setEncrypted(boolean encrypted)
Sets whether an encrypted (SSL) connection should be used when connecting to
Pusher.
|
PusherOptions |
setHost(String host)
The host to which connections will be made.
|
PusherOptions |
setPongTimeout(long pongTimeout)
The number of milliseconds after a "ping" is sent that the client will
wait to receive a "pong" response from the server before considering the
connection broken and triggering a transition to the disconnected state.
|
PusherOptions |
setWsPort(int wsPort)
The port to which unencrypted connections will be made.
|
PusherOptions |
setWssPort(int wssPort)
The port to which encrypted connections will be made.
|
public static final String LIB_VERSION
public boolean isEncrypted()
public PusherOptions setEncrypted(boolean encrypted)
encrypted
- Whether to use an SSL connectionpublic Authorizer getAuthorizer()
public PusherOptions setAuthorizer(Authorizer authorizer)
authorizer
- The authorizer to be used.public PusherOptions setHost(String host)
host
- The hostpublic PusherOptions setWsPort(int wsPort)
wsPort
- port numberpublic PusherOptions setWssPort(int wssPort)
wssPort
- port numberpublic PusherOptions setCluster(String cluster)
public PusherOptions setActivityTimeout(long activityTimeout)
activityTimeout
- time to consider connection idle, in millisecondspublic long getActivityTimeout()
public PusherOptions setPongTimeout(long pongTimeout)
pongTimeout
- time to wait for pong response, in millisecondspublic long getPongTimeout()
Copyright © 2017 Pusher. All rights reserved.