Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


This function will authenticate using the supplied project keys, and the connection will permit the read (subscribe), write (unsubscribe) and admin operations based on the supplied keys. It returns a Future which will either be completed with a ConnectionHandle or failed with a Throwable if the initial connection attempt failed.

PubSubOptions

The various handler options set their respective handlers documented under event handlers.

url

String | default: 'wss://api.cogswell.io/pubsub'

...

If provided, this indicates the UUID of the session that should be restored if possible.

onRawRecordHandler

(RawRecord) => Unit | optional

onMessageHandler

(MessageRecord) => Unit | optional

onErrorHandler

(Throwable) => Unit | optional

onErrorResponseHandler

(PubSubErrorResponse) => Unit | optional

onCloseHandler

(Option[Throwable]) => Unit | optional

onNewSessionHandler

(UUID) => Unit | optional

ConnectionHandle

Pub/Sub

getSessionUuid

...