why deepstreamHub? compare us getting started faq
use cases
products
developers
company
blog contact

A singleton that allows for centralized access to a created DeepstreamClient. Alternatively, clients can be initialised directly.

Currently this only contains a single deepstream client.

Methods

getInstance()

DeepstreamFactory getInstance()
Show example...

getClient()

DeepstreamClient getClient()
Returns the last client that was created. This is useful for most applications that only require a single connection. The first time a client is connected however it has to be via getClient(url) or getClient(url,options). Show example...

getClient(url)

DeepstreamClient getClient(String url) throws URISyntaxException
argument type description
url String The url to connect to, also the key used to retrieve in

Returns a client that was previous created via the same url using this method or getClient(url,options).

If a client hasn't been created yet, it creates it first and stores it for future reference.

Show example...

getClient(url,options)

DeepstreamClient getClient(String url, Properties options) throws URISyntaxException, InvalidDeepstreamConfig
argument type description
url String The url to connect to, also the key used to retrieve in
options Properties The options to use within the deepstream client

Returns a client that was previous created via the same url using this method or getClient(url,options).

If a client hasn't been created yet, it creates it first and stores it for future reference.