The classic client API will be removed in a future release.
@Deprecated public final class ConnectionFactory extends Object
ConnectionDetails
and ServerDetails
objects.Modifier and Type | Method and Description |
---|---|
static ConnectionDetails |
createConnectionDetails()
Deprecated.
Creates Connection Details with no Server Details specified.
|
static ConnectionDetails |
createConnectionDetails(Collection<ServerDetails> serverDetails)
Deprecated.
Creates Connection Details
|
static ConnectionDetails |
createConnectionDetails(ServerDetails... serverDetails)
Deprecated.
Creates Connection Details with a list of
ServerDetails . |
static ConnectionDetails |
createConnectionDetails(String... urls)
Deprecated.
Creates Connection Details for a list of URLs.
|
static ServerDetails |
createServerDetails(String url)
Deprecated.
Creates a
ServerDetails object from a URL. |
public static ConnectionDetails createConnectionDetails()
Server Details would need to be set explicitly using
ConnectionDetails.setServerDetails(Collection)
before the
Connection Details could be used for connection.
public static ConnectionDetails createConnectionDetails(Collection<ServerDetails> serverDetails)
serverDetails
- a collection of server specifications.public static ConnectionDetails createConnectionDetails(String... urls) throws APIException
This is a convenience method which will cause a list of
ServerDetails
objects to be created which correspond to the
specified URLs.
urls
- one or more URLs from which ServerDetails
objects
will be created.APIException
- if one or more URLs are invalid.public static ConnectionDetails createConnectionDetails(ServerDetails... serverDetails)
ServerDetails
.serverDetails
- one or more server specifications.public static ServerDetails createServerDetails(String url) throws APIException
ServerDetails
object from a URL.
The URL should take the form scheme://host:port, where scheme is chosen from the following table and determines the transport protocol used to send Diffusion messages.
Scheme | Transport Protocol |
---|---|
ws |
WebSocket. See RFC 6455 . |
wss |
WebSocket over TLS. |
dpt |
Deprecated since 5.9. "DPT" or Diffusion Protocol. A proprietary TCP protocol. Prefer the WebSocket protocol. |
dpts |
Deprecated since 5.9. Diffusion Protocol over TLS.
Deprecated since 5.9. |
http |
Deprecated since 5.7. HTTP Duplex. A proprietary TCP protocol that is sufficiently like HTTP to be acceptable to some third-party network intermediaries. Prefer the WebSocket protocol. |
https |
Deprecated since 5.7. HTTP Duplex over TLS. Prefer the WebSocket protocol. |
We recommend using the WebSocket protocol options ( ws
or
wss
). There is no measurable performance difference between the
DPT and WebSocket protocols.
TLS is Transport Layer Security, commonly known as SSL. TLS-based protocols use cryptography to provide transport-level privacy, authentication, and integrity, and protects against network-sniffing and man-in-the-middle attacks. We recommend using the TLS variants for all communication. For a typical application, you should only consider not using TLS for unauthenticated ("anonymous") client sessions.
The HTTP Duplex protocol was deprecated in version 5.7 and will be removed in a future release of the product.
url
- the URLServerDetails
object of the correct transport type for
the URL.APIException
- if the URL is invalidCopyright © 2016 Push Technology Ltd. All Rights Reserved.