public class PusherOptions extends java.lang.Object
Pusher instance.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
LIB_VERSION |
| Constructor and Description |
|---|
PusherOptions() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
buildUrl(java.lang.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() |
java.net.Proxy |
getProxy() |
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(java.lang.String cluster) |
PusherOptions |
setEncrypted(boolean encrypted)
Sets whether an encrypted (SSL) connection should be used when connecting to
Pusher.
|
PusherOptions |
setHost(java.lang.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 |
setProxy(java.net.Proxy proxy)
The default value is Proxy.NO_PROXY.
|
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 java.lang.String LIB_VERSION
public PusherOptions()
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(java.lang.String host)
host - The hostpublic PusherOptions setWsPort(int wsPort)
wsPort - port numberpublic PusherOptions setWssPort(int wssPort)
wssPort - port numberpublic PusherOptions setCluster(java.lang.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()
public java.lang.String buildUrl(java.lang.String apiKey)
apiKey - The API keypublic PusherOptions setProxy(java.net.Proxy proxy)
proxy - Specify a proxy, e.g. options.setProxy( new Proxy( Proxy.Type.HTTP, new InetSocketAddress( "proxyaddress", 80 ) ) );public java.net.Proxy getProxy()