From 03a414591563ca4e8ea4a97a5a3f6a00ce218d7a Mon Sep 17 00:00:00 2001 From: Nicolas goy Date: Wed, 12 Feb 2020 01:21:00 +0100 Subject: [PATCH] Update documentation --- docs/alltypes/index.html | 8 +- .../-channel/-event/-c-l-o-s-e.html | 4 +- .../-channel/-event/-e-r-r-o-r.html | 4 +- .../-channel/-event/-j-o-i-n.html | 4 +- .../-channel/-event/-l-e-a-v-e.html | 4 +- .../-channel/-event/-r-e-p-l-y.html | 4 +- .../-channel/-event/event.html | 4 +- .../-channel/-event/index.html | 5 +- docs/ch.kuon.phoenix/-channel/-init-.html | 14 - .../-channel/-life-cycle-events.html | 4 +- .../-channel/-message/-init-.html | 7 +- .../-channel/-message/build.html | 16 - .../-channel/-message/error.html | 14 - .../-channel/-message/get-error.html | 7 +- .../-channel/-message/index.html | 46 +- .../-channel/-message/is-error.html | 5 +- .../-channel/-message/leave.html | 14 - .../-channel/-message/none.html | 14 - .../-channel/-message/response.html | 7 +- .../-channel/-message/status.html | 5 +- .../-channel/-push/-init-.html | 4 +- .../ch.kuon.phoenix/-channel/-push/index.html | 6 +- .../-channel/-push/receive.html | 14 +- .../-channel/-state/-c-l-o-s-e-d.html | 4 +- .../-channel/-state/-e-r-r-o-r-e-d.html | 4 +- .../-channel/-state/-j-o-i-n-e-d.html | 4 +- .../-channel/-state/-j-o-i-n-i-n-g.html | 4 +- .../-channel/-state/-l-e-a-v-i-n-g.html | 4 +- .../-channel/-state/index.html | 5 +- .../-channel/-state/state.html | 4 +- docs/ch.kuon.phoenix/-channel/index.html | 28 +- docs/ch.kuon.phoenix/-channel/join.html | 12 +- docs/ch.kuon.phoenix/-channel/leave.html | 12 +- docs/ch.kuon.phoenix/-channel/off.html | 12 +- docs/ch.kuon.phoenix/-channel/on-close.html | 11 +- docs/ch.kuon.phoenix/-channel/on-error.html | 11 +- docs/ch.kuon.phoenix/-channel/on.html | 14 +- docs/ch.kuon.phoenix/-channel/params.html | 4 +- docs/ch.kuon.phoenix/-channel/push.html | 14 +- docs/ch.kuon.phoenix/-channel/socket.html | 4 +- docs/ch.kuon.phoenix/-channel/to-string.html | 4 +- docs/ch.kuon.phoenix/-channel/topic.html | 4 +- docs/ch.kuon.phoenix/-ex-timer/-init-.html | 33 +- docs/ch.kuon.phoenix/-ex-timer/callback.html | 4 +- docs/ch.kuon.phoenix/-ex-timer/index.html | 41 +- docs/ch.kuon.phoenix/-ex-timer/reset.html | 5 +- .../-ex-timer/schedule-timeout.html | 5 +- .../ch.kuon.phoenix/-ex-timer/timer-calc.html | 32 +- docs/ch.kuon.phoenix/-ex-timer/timer.html | 4 +- docs/ch.kuon.phoenix/-ex-timer/tries.html | 4 +- .../ch.kuon.phoenix/-library-test/-init-.html | 14 + docs/ch.kuon.phoenix/-library-test/index.html | 79 +++ .../-library-test/test-broadcast.html | 14 + .../-library-test/test-connect.html | 14 + .../-library-test/test-echo.html | 14 + .../-library-test/test-join-error.html | 14 + .../-library-test/test-presence.html | 14 + .../-library-test/test-timer.html | 14 + .../-library-test/test-u-r-l.html | 14 + .../-presence/-diff/-init-.html | 14 - .../-presence/-diff/index.html | 44 -- .../-presence/-diff/joins.html | 14 - .../-presence/-diff/leaves.html | 14 - .../-presence/-entry/-init-.html | 10 +- .../-presence/-entry/get-metas.html | 17 + .../-presence/-entry/index.html | 36 +- .../-presence/-entry/metas.html | 14 - .../-presence/-entry/prepend-metas.html | 14 - .../-presence/-entry/raw-data.html | 18 + .../-presence/-entry/set-metas.html | 16 - .../ch.kuon.phoenix/-presence/-entry/str.html | 14 - docs/ch.kuon.phoenix/-presence/-init-.html | 5 +- .../-options/-event-names/-init-.html | 4 +- .../-presence/-options/-event-names/diff.html | 4 +- .../-options/-event-names/index.html | 4 +- .../-options/-event-names/state.html | 4 +- .../-presence/-options/-init-.html | 7 +- .../-presence/-options/event-names.html | 4 +- .../-presence/-options/index.html | 8 +- docs/ch.kuon.phoenix/-presence/channel.html | 8 +- docs/ch.kuon.phoenix/-presence/clone.html | 16 - .../-presence/in-pending-sync-state.html | 5 +- docs/ch.kuon.phoenix/-presence/index.html | 60 +-- docs/ch.kuon.phoenix/-presence/list.html | 10 +- docs/ch.kuon.phoenix/-presence/map.html | 14 - docs/ch.kuon.phoenix/-presence/on-join.html | 5 +- docs/ch.kuon.phoenix/-presence/on-leave.html | 5 +- docs/ch.kuon.phoenix/-presence/on-sync.html | 5 +- docs/ch.kuon.phoenix/-presence/opts.html | 8 +- docs/ch.kuon.phoenix/-presence/sync-diff.html | 14 - .../ch.kuon.phoenix/-presence/sync-state.html | 14 - docs/ch.kuon.phoenix/-socket/-init-.html | 11 +- .../-socket/-message/-init-.html | 7 +- .../-socket/-message/event.html | 8 +- .../-socket/-message/index.html | 13 +- .../-socket/-message/join-ref.html | 8 +- .../-socket/-message/payload.html | 8 +- .../ch.kuon.phoenix/-socket/-message/ref.html | 8 +- .../-socket/-message/to-string.html | 4 +- .../-socket/-message/topic.html | 8 +- .../-socket/-options/-init-.html | 9 +- .../-options/heartbeat-interval-ms.html | 5 +- .../-socket/-options/index.html | 16 +- .../-socket/-options/logger.html | 6 +- .../-socket/-options/params.html | 10 +- .../-socket/-options/reconnect-after-ms.html | 5 +- .../-socket/-options/rejoin-after-ms.html | 5 +- .../-socket/-options/timeout.html | 5 +- .../-socket/-state/-c-l-o-s-e-d.html | 4 +- .../-socket/-state/-c-l-o-s-i-n-g.html | 4 +- .../-socket/-state/-c-o-n-n-e-c-t-i-n-g.html | 4 +- .../-socket/-state/-c-r-e-a-t-e-d.html | 4 +- .../-socket/-state/-o-p-e-n.html | 4 +- .../-socket/-state/-u-n-k-n-o-w-n.html | 4 +- .../ch.kuon.phoenix/-socket/-state/index.html | 5 +- .../ch.kuon.phoenix/-socket/-state/state.html | 4 +- docs/ch.kuon.phoenix/-socket/channel.html | 13 +- docs/ch.kuon.phoenix/-socket/connect.html | 5 +- .../-socket/connection-state.html | 7 +- docs/ch.kuon.phoenix/-socket/disconnect.html | 14 +- .../-socket/end-point-u-r-l.html | 4 +- docs/ch.kuon.phoenix/-socket/index.html | 41 +- .../ch.kuon.phoenix/-socket/is-connected.html | 8 +- docs/ch.kuon.phoenix/-socket/log.html | 12 +- docs/ch.kuon.phoenix/-socket/off.html | 16 +- docs/ch.kuon.phoenix/-socket/on-close.html | 13 +- docs/ch.kuon.phoenix/-socket/on-error.html | 13 +- docs/ch.kuon.phoenix/-socket/on-message.html | 13 +- docs/ch.kuon.phoenix/-socket/on-open.html | 13 +- docs/ch.kuon.phoenix/-socket/opts.html | 10 +- docs/ch.kuon.phoenix/-socket/push.html | 8 +- docs/ch.kuon.phoenix/-socket/to-string.html | 4 +- docs/ch.kuon.phoenix/-socket/url.html | 8 +- docs/ch.kuon.phoenix/index.html | 26 +- docs/ch.kuon.phoenix/url.html | 14 + docs/index-outline.html | 501 +++++++++--------- docs/index.html | 4 +- 137 files changed, 1149 insertions(+), 888 deletions(-) delete mode 100644 docs/ch.kuon.phoenix/-channel/-init-.html delete mode 100644 docs/ch.kuon.phoenix/-channel/-message/build.html delete mode 100644 docs/ch.kuon.phoenix/-channel/-message/error.html delete mode 100644 docs/ch.kuon.phoenix/-channel/-message/leave.html delete mode 100644 docs/ch.kuon.phoenix/-channel/-message/none.html create mode 100644 docs/ch.kuon.phoenix/-library-test/-init-.html create mode 100644 docs/ch.kuon.phoenix/-library-test/index.html create mode 100644 docs/ch.kuon.phoenix/-library-test/test-broadcast.html create mode 100644 docs/ch.kuon.phoenix/-library-test/test-connect.html create mode 100644 docs/ch.kuon.phoenix/-library-test/test-echo.html create mode 100644 docs/ch.kuon.phoenix/-library-test/test-join-error.html create mode 100644 docs/ch.kuon.phoenix/-library-test/test-presence.html create mode 100644 docs/ch.kuon.phoenix/-library-test/test-timer.html create mode 100644 docs/ch.kuon.phoenix/-library-test/test-u-r-l.html delete mode 100644 docs/ch.kuon.phoenix/-presence/-diff/-init-.html delete mode 100644 docs/ch.kuon.phoenix/-presence/-diff/index.html delete mode 100644 docs/ch.kuon.phoenix/-presence/-diff/joins.html delete mode 100644 docs/ch.kuon.phoenix/-presence/-diff/leaves.html create mode 100644 docs/ch.kuon.phoenix/-presence/-entry/get-metas.html delete mode 100644 docs/ch.kuon.phoenix/-presence/-entry/metas.html delete mode 100644 docs/ch.kuon.phoenix/-presence/-entry/prepend-metas.html create mode 100644 docs/ch.kuon.phoenix/-presence/-entry/raw-data.html delete mode 100644 docs/ch.kuon.phoenix/-presence/-entry/set-metas.html delete mode 100644 docs/ch.kuon.phoenix/-presence/-entry/str.html delete mode 100644 docs/ch.kuon.phoenix/-presence/clone.html delete mode 100644 docs/ch.kuon.phoenix/-presence/map.html delete mode 100644 docs/ch.kuon.phoenix/-presence/sync-diff.html delete mode 100644 docs/ch.kuon.phoenix/-presence/sync-state.html create mode 100644 docs/ch.kuon.phoenix/url.html diff --git a/docs/alltypes/index.html b/docs/alltypes/index.html index 2bfc86c..518f6b8 100644 --- a/docs/alltypes/index.html +++ b/docs/alltypes/index.html @@ -1,7 +1,7 @@ -alltypes - java-phoenix-channel +alltypes - phoenix-channel @@ -10,16 +10,22 @@

All Types

ch.kuon.phoenix.Channel
+

Phoenix channel client

ch.kuon.phoenix.ExTimer

Exponential backoff timer

+
ch.kuon.phoenix.LibraryTest
+ +
ch.kuon.phoenix.Presence
+

Listen for presence changes

ch.kuon.phoenix.Socket
+

Socket main constructor.

diff --git a/docs/ch.kuon.phoenix/-channel/-event/-c-l-o-s-e.html b/docs/ch.kuon.phoenix/-channel/-event/-c-l-o-s-e.html index 64d748e..76f2797 100644 --- a/docs/ch.kuon.phoenix/-channel/-event/-c-l-o-s-e.html +++ b/docs/ch.kuon.phoenix/-channel/-event/-c-l-o-s-e.html @@ -1,11 +1,11 @@ -Channel.Event.CLOSE - java-phoenix-channel +Channel.Event.CLOSE - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / Event / CLOSE
+phoenix-channel / ch.kuon.phoenix / Channel / Event / CLOSE

CLOSE

diff --git a/docs/ch.kuon.phoenix/-channel/-event/-e-r-r-o-r.html b/docs/ch.kuon.phoenix/-channel/-event/-e-r-r-o-r.html index 164a598..c6e3474 100644 --- a/docs/ch.kuon.phoenix/-channel/-event/-e-r-r-o-r.html +++ b/docs/ch.kuon.phoenix/-channel/-event/-e-r-r-o-r.html @@ -1,11 +1,11 @@ -Channel.Event.ERROR - java-phoenix-channel +Channel.Event.ERROR - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / Event / ERROR
+phoenix-channel / ch.kuon.phoenix / Channel / Event / ERROR

ERROR

diff --git a/docs/ch.kuon.phoenix/-channel/-event/-j-o-i-n.html b/docs/ch.kuon.phoenix/-channel/-event/-j-o-i-n.html index 92d8e44..b5a588d 100644 --- a/docs/ch.kuon.phoenix/-channel/-event/-j-o-i-n.html +++ b/docs/ch.kuon.phoenix/-channel/-event/-j-o-i-n.html @@ -1,11 +1,11 @@ -Channel.Event.JOIN - java-phoenix-channel +Channel.Event.JOIN - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / Event / JOIN
+phoenix-channel / ch.kuon.phoenix / Channel / Event / JOIN

JOIN

diff --git a/docs/ch.kuon.phoenix/-channel/-event/-l-e-a-v-e.html b/docs/ch.kuon.phoenix/-channel/-event/-l-e-a-v-e.html index 8e02f1c..f89a495 100644 --- a/docs/ch.kuon.phoenix/-channel/-event/-l-e-a-v-e.html +++ b/docs/ch.kuon.phoenix/-channel/-event/-l-e-a-v-e.html @@ -1,11 +1,11 @@ -Channel.Event.LEAVE - java-phoenix-channel +Channel.Event.LEAVE - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / Event / LEAVE
+phoenix-channel / ch.kuon.phoenix / Channel / Event / LEAVE

LEAVE

diff --git a/docs/ch.kuon.phoenix/-channel/-event/-r-e-p-l-y.html b/docs/ch.kuon.phoenix/-channel/-event/-r-e-p-l-y.html index b710774..3042b98 100644 --- a/docs/ch.kuon.phoenix/-channel/-event/-r-e-p-l-y.html +++ b/docs/ch.kuon.phoenix/-channel/-event/-r-e-p-l-y.html @@ -1,11 +1,11 @@ -Channel.Event.REPLY - java-phoenix-channel +Channel.Event.REPLY - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / Event / REPLY
+phoenix-channel / ch.kuon.phoenix / Channel / Event / REPLY

REPLY

diff --git a/docs/ch.kuon.phoenix/-channel/-event/event.html b/docs/ch.kuon.phoenix/-channel/-event/event.html index 82e35fa..5e70a8c 100644 --- a/docs/ch.kuon.phoenix/-channel/-event/event.html +++ b/docs/ch.kuon.phoenix/-channel/-event/event.html @@ -1,11 +1,11 @@ -Channel.Event.event - java-phoenix-channel +Channel.Event.event - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / Event / event
+phoenix-channel / ch.kuon.phoenix / Channel / Event / event

event

diff --git a/docs/ch.kuon.phoenix/-channel/-event/index.html b/docs/ch.kuon.phoenix/-channel/-event/index.html index a5a8bd6..8c2990f 100644 --- a/docs/ch.kuon.phoenix/-channel/-event/index.html +++ b/docs/ch.kuon.phoenix/-channel/-event/index.html @@ -1,14 +1,15 @@ -Channel.Event - java-phoenix-channel +Channel.Event - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / Event
+phoenix-channel / ch.kuon.phoenix / Channel / Event

Event

enum class Event +

Channel built in events

Enum Values

diff --git a/docs/ch.kuon.phoenix/-channel/-init-.html b/docs/ch.kuon.phoenix/-channel/-init-.html deleted file mode 100644 index bdeb8d5..0000000 --- a/docs/ch.kuon.phoenix/-channel/-init-.html +++ /dev/null @@ -1,14 +0,0 @@ - - - -Channel.<init> - java-phoenix-channel - - - -java-phoenix-channel / ch.kuon.phoenix / Channel / <init>
-
-

<init>

- -Channel(topic: String, params: JSONObject, socket: Socket) - - diff --git a/docs/ch.kuon.phoenix/-channel/-life-cycle-events.html b/docs/ch.kuon.phoenix/-channel/-life-cycle-events.html index 9e43ae8..ac30524 100644 --- a/docs/ch.kuon.phoenix/-channel/-life-cycle-events.html +++ b/docs/ch.kuon.phoenix/-channel/-life-cycle-events.html @@ -1,11 +1,11 @@ -Channel.LifeCycleEvents - java-phoenix-channel +Channel.LifeCycleEvents - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / LifeCycleEvents
+phoenix-channel / ch.kuon.phoenix / Channel / LifeCycleEvents

LifeCycleEvents

diff --git a/docs/ch.kuon.phoenix/-channel/-message/-init-.html b/docs/ch.kuon.phoenix/-channel/-message/-init-.html index 5221896..1d8bee7 100644 --- a/docs/ch.kuon.phoenix/-channel/-message/-init-.html +++ b/docs/ch.kuon.phoenix/-channel/-message/-init-.html @@ -1,14 +1,17 @@ -Channel.Message.<init> - java-phoenix-channel +Channel.Message.<init> - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / Message / <init>
+phoenix-channel / ch.kuon.phoenix / Channel / Message / <init>

<init>

Message() +

Channel messages

+

Usually this class should not be created directly. It is +used as a wrapper around response in Channel.on callback.

diff --git a/docs/ch.kuon.phoenix/-channel/-message/build.html b/docs/ch.kuon.phoenix/-channel/-message/build.html deleted file mode 100644 index e546658..0000000 --- a/docs/ch.kuon.phoenix/-channel/-message/build.html +++ /dev/null @@ -1,16 +0,0 @@ - - - -Channel.Message.build - java-phoenix-channel - - - -java-phoenix-channel / ch.kuon.phoenix / Channel / Message / build
-
-

build

- -fun build(status: String, response: JSONObject): Message
- -fun build(payload: JSONObject): Message - - diff --git a/docs/ch.kuon.phoenix/-channel/-message/error.html b/docs/ch.kuon.phoenix/-channel/-message/error.html deleted file mode 100644 index a050329..0000000 --- a/docs/ch.kuon.phoenix/-channel/-message/error.html +++ /dev/null @@ -1,14 +0,0 @@ - - - -Channel.Message.error - java-phoenix-channel - - - -java-phoenix-channel / ch.kuon.phoenix / Channel / Message / error
-
-

error

- -fun error(error: String): Message - - diff --git a/docs/ch.kuon.phoenix/-channel/-message/get-error.html b/docs/ch.kuon.phoenix/-channel/-message/get-error.html index b81f185..7bf4fee 100644 --- a/docs/ch.kuon.phoenix/-channel/-message/get-error.html +++ b/docs/ch.kuon.phoenix/-channel/-message/get-error.html @@ -1,14 +1,17 @@ -Channel.Message.getError - java-phoenix-channel +Channel.Message.getError - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / Message / getError
+phoenix-channel / ch.kuon.phoenix / Channel / Message / getError

getError

open fun getError(): String +

Returns the error reason.

+

If this message is not an error, this will throw an exception +so be sure to check Message.isError first.

diff --git a/docs/ch.kuon.phoenix/-channel/-message/index.html b/docs/ch.kuon.phoenix/-channel/-message/index.html index b3350af..05ba55d 100644 --- a/docs/ch.kuon.phoenix/-channel/-message/index.html +++ b/docs/ch.kuon.phoenix/-channel/-message/index.html @@ -1,14 +1,17 @@ -Channel.Message - java-phoenix-channel +Channel.Message - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / Message
+phoenix-channel / ch.kuon.phoenix / Channel / Message

Message

abstract class Message +

Channel messages

+

Usually this class should not be created directly. It is +used as a wrapper around response in Channel.on callback.

Constructors

@@ -17,6 +20,7 @@

Constructors

<init>

@@ -29,6 +33,7 @@

Properties

response

@@ -36,6 +41,7 @@

response

status

@@ -48,6 +54,7 @@

Functions

getError

@@ -55,43 +62,10 @@

getError

isError

+

Channel messages

Message()
+

Response data from the server

abstract val response: JSONObject
+

Status of the response as sent by the server.

abstract val status: String
+

Returns the error reason.

open fun getError(): String
+

Returns the error state of the message

open fun isError(): Boolean
-

Companion Object Functions

- - - - - - - - - - - - - - - - - - - -
-

build

-
-fun build(status: String, response: JSONObject): Message
-fun build(payload: JSONObject): Message
-

error

-
-fun error(error: String): Message
-

leave

-
-fun leave(): Message
-

none

-
-fun none(): Message
diff --git a/docs/ch.kuon.phoenix/-channel/-message/is-error.html b/docs/ch.kuon.phoenix/-channel/-message/is-error.html index 06e4072..58e4d7e 100644 --- a/docs/ch.kuon.phoenix/-channel/-message/is-error.html +++ b/docs/ch.kuon.phoenix/-channel/-message/is-error.html @@ -1,14 +1,15 @@ -Channel.Message.isError - java-phoenix-channel +Channel.Message.isError - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / Message / isError
+phoenix-channel / ch.kuon.phoenix / Channel / Message / isError

isError

open fun isError(): Boolean +

Returns the error state of the message

diff --git a/docs/ch.kuon.phoenix/-channel/-message/leave.html b/docs/ch.kuon.phoenix/-channel/-message/leave.html deleted file mode 100644 index 8cf75a3..0000000 --- a/docs/ch.kuon.phoenix/-channel/-message/leave.html +++ /dev/null @@ -1,14 +0,0 @@ - - - -Channel.Message.leave - java-phoenix-channel - - - -java-phoenix-channel / ch.kuon.phoenix / Channel / Message / leave
-
-

leave

- -fun leave(): Message - - diff --git a/docs/ch.kuon.phoenix/-channel/-message/none.html b/docs/ch.kuon.phoenix/-channel/-message/none.html deleted file mode 100644 index 7757ae4..0000000 --- a/docs/ch.kuon.phoenix/-channel/-message/none.html +++ /dev/null @@ -1,14 +0,0 @@ - - - -Channel.Message.none - java-phoenix-channel - - - -java-phoenix-channel / ch.kuon.phoenix / Channel / Message / none
-
-

none

- -fun none(): Message - - diff --git a/docs/ch.kuon.phoenix/-channel/-message/response.html b/docs/ch.kuon.phoenix/-channel/-message/response.html index 21968c0..d2def53 100644 --- a/docs/ch.kuon.phoenix/-channel/-message/response.html +++ b/docs/ch.kuon.phoenix/-channel/-message/response.html @@ -1,14 +1,17 @@ -Channel.Message.response - java-phoenix-channel +Channel.Message.response - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / Message / response
+phoenix-channel / ch.kuon.phoenix / Channel / Message / response

response

abstract val response: JSONObject +

Response data from the server

+

It can be an empty object if the response was empty, but never +null.

diff --git a/docs/ch.kuon.phoenix/-channel/-message/status.html b/docs/ch.kuon.phoenix/-channel/-message/status.html index 1eb7104..e566fe4 100644 --- a/docs/ch.kuon.phoenix/-channel/-message/status.html +++ b/docs/ch.kuon.phoenix/-channel/-message/status.html @@ -1,14 +1,15 @@ -Channel.Message.status - java-phoenix-channel +Channel.Message.status - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / Message / status
+phoenix-channel / ch.kuon.phoenix / Channel / Message / status

status

abstract val status: String +

Status of the response as sent by the server.

diff --git a/docs/ch.kuon.phoenix/-channel/-push/-init-.html b/docs/ch.kuon.phoenix/-channel/-push/-init-.html index d9bdf71..a2213bb 100644 --- a/docs/ch.kuon.phoenix/-channel/-push/-init-.html +++ b/docs/ch.kuon.phoenix/-channel/-push/-init-.html @@ -1,11 +1,11 @@ -Channel.Push.<init> - java-phoenix-channel +Channel.Push.<init> - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / Push / <init>
+phoenix-channel / ch.kuon.phoenix / Channel / Push / <init>

<init>

diff --git a/docs/ch.kuon.phoenix/-channel/-push/index.html b/docs/ch.kuon.phoenix/-channel/-push/index.html index 711750a..66192f8 100644 --- a/docs/ch.kuon.phoenix/-channel/-push/index.html +++ b/docs/ch.kuon.phoenix/-channel/-push/index.html @@ -1,11 +1,11 @@ -Channel.Push - java-phoenix-channel +Channel.Push - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / Push
+phoenix-channel / ch.kuon.phoenix / Channel / Push

Push

class Push @@ -29,6 +29,8 @@

Functions

receive

+

Register a callback when a message with the following +status is returned.

fun receive(status: String, callback: (JSONObject) -> Unit): Push diff --git a/docs/ch.kuon.phoenix/-channel/-push/receive.html b/docs/ch.kuon.phoenix/-channel/-push/receive.html index 7ae5c3a..9764771 100644 --- a/docs/ch.kuon.phoenix/-channel/-push/receive.html +++ b/docs/ch.kuon.phoenix/-channel/-push/receive.html @@ -1,14 +1,24 @@ -Channel.Push.receive - java-phoenix-channel +Channel.Push.receive - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / Push / receive
+phoenix-channel / ch.kuon.phoenix / Channel / Push / receive

receive

fun receive(status: String, callback: (JSONObject) -> Unit): Push +

Register a callback when a message with the following +status is returned.

+

Note: the callback might be called from another thread.

+

Parameters

+

+status - The status to register the callback for

+

+callback - A callback called with the response

+

Return
+Self for method chaining

diff --git a/docs/ch.kuon.phoenix/-channel/-state/-c-l-o-s-e-d.html b/docs/ch.kuon.phoenix/-channel/-state/-c-l-o-s-e-d.html index ddede85..76d2e7c 100644 --- a/docs/ch.kuon.phoenix/-channel/-state/-c-l-o-s-e-d.html +++ b/docs/ch.kuon.phoenix/-channel/-state/-c-l-o-s-e-d.html @@ -1,11 +1,11 @@ -Channel.State.CLOSED - java-phoenix-channel +Channel.State.CLOSED - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / State / CLOSED
+phoenix-channel / ch.kuon.phoenix / Channel / State / CLOSED

CLOSED

diff --git a/docs/ch.kuon.phoenix/-channel/-state/-e-r-r-o-r-e-d.html b/docs/ch.kuon.phoenix/-channel/-state/-e-r-r-o-r-e-d.html index a38386a..9db76f2 100644 --- a/docs/ch.kuon.phoenix/-channel/-state/-e-r-r-o-r-e-d.html +++ b/docs/ch.kuon.phoenix/-channel/-state/-e-r-r-o-r-e-d.html @@ -1,11 +1,11 @@ -Channel.State.ERRORED - java-phoenix-channel +Channel.State.ERRORED - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / State / ERRORED
+phoenix-channel / ch.kuon.phoenix / Channel / State / ERRORED

ERRORED

diff --git a/docs/ch.kuon.phoenix/-channel/-state/-j-o-i-n-e-d.html b/docs/ch.kuon.phoenix/-channel/-state/-j-o-i-n-e-d.html index a063bfc..00b73b6 100644 --- a/docs/ch.kuon.phoenix/-channel/-state/-j-o-i-n-e-d.html +++ b/docs/ch.kuon.phoenix/-channel/-state/-j-o-i-n-e-d.html @@ -1,11 +1,11 @@ -Channel.State.JOINED - java-phoenix-channel +Channel.State.JOINED - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / State / JOINED
+phoenix-channel / ch.kuon.phoenix / Channel / State / JOINED

JOINED

diff --git a/docs/ch.kuon.phoenix/-channel/-state/-j-o-i-n-i-n-g.html b/docs/ch.kuon.phoenix/-channel/-state/-j-o-i-n-i-n-g.html index b9aaf9f..440c04c 100644 --- a/docs/ch.kuon.phoenix/-channel/-state/-j-o-i-n-i-n-g.html +++ b/docs/ch.kuon.phoenix/-channel/-state/-j-o-i-n-i-n-g.html @@ -1,11 +1,11 @@ -Channel.State.JOINING - java-phoenix-channel +Channel.State.JOINING - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / State / JOINING
+phoenix-channel / ch.kuon.phoenix / Channel / State / JOINING

JOINING

diff --git a/docs/ch.kuon.phoenix/-channel/-state/-l-e-a-v-i-n-g.html b/docs/ch.kuon.phoenix/-channel/-state/-l-e-a-v-i-n-g.html index 52557a6..ab103ab 100644 --- a/docs/ch.kuon.phoenix/-channel/-state/-l-e-a-v-i-n-g.html +++ b/docs/ch.kuon.phoenix/-channel/-state/-l-e-a-v-i-n-g.html @@ -1,11 +1,11 @@ -Channel.State.LEAVING - java-phoenix-channel +Channel.State.LEAVING - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / State / LEAVING
+phoenix-channel / ch.kuon.phoenix / Channel / State / LEAVING

LEAVING

diff --git a/docs/ch.kuon.phoenix/-channel/-state/index.html b/docs/ch.kuon.phoenix/-channel/-state/index.html index 69e679e..fcd2977 100644 --- a/docs/ch.kuon.phoenix/-channel/-state/index.html +++ b/docs/ch.kuon.phoenix/-channel/-state/index.html @@ -1,14 +1,15 @@ -Channel.State - java-phoenix-channel +Channel.State - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / State
+phoenix-channel / ch.kuon.phoenix / Channel / State

State

enum class State +

Channel state

Enum Values

diff --git a/docs/ch.kuon.phoenix/-channel/-state/state.html b/docs/ch.kuon.phoenix/-channel/-state/state.html index f006f63..44e4e93 100644 --- a/docs/ch.kuon.phoenix/-channel/-state/state.html +++ b/docs/ch.kuon.phoenix/-channel/-state/state.html @@ -1,11 +1,11 @@ -Channel.State.state - java-phoenix-channel +Channel.State.state - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / State / state
+phoenix-channel / ch.kuon.phoenix / Channel / State / state

state

diff --git a/docs/ch.kuon.phoenix/-channel/index.html b/docs/ch.kuon.phoenix/-channel/index.html index 4323f0c..a1b0d17 100644 --- a/docs/ch.kuon.phoenix/-channel/index.html +++ b/docs/ch.kuon.phoenix/-channel/index.html @@ -1,14 +1,16 @@ -Channel - java-phoenix-channel +Channel - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel
+phoenix-channel / ch.kuon.phoenix / Channel

Channel

class Channel +

Phoenix channel client

+

Channels are created using the Socket.channel method.

Types

@@ -17,6 +19,7 @@

Types

Event

@@ -24,6 +27,7 @@

Event

Message

@@ -38,22 +42,11 @@

Push

State

+

Channel built in events

enum class Event
+

Channel messages

abstract class Message
+

Channel state

enum class State
-

Constructors

- - - - - - - -
-

<init>

-
-Channel(topic: String, params: JSONObject, socket: Socket)

Properties

@@ -88,6 +81,7 @@

Functions

join

@@ -95,6 +89,7 @@

join

leave

@@ -102,6 +97,7 @@

leave

off

@@ -109,6 +105,7 @@

off

on

@@ -116,6 +113,7 @@

on

onClose

@@ -123,6 +121,7 @@

onClose

onError

@@ -130,6 +129,7 @@

onError

push

diff --git a/docs/ch.kuon.phoenix/-channel/join.html b/docs/ch.kuon.phoenix/-channel/join.html index 9c11e67..9818b65 100644 --- a/docs/ch.kuon.phoenix/-channel/join.html +++ b/docs/ch.kuon.phoenix/-channel/join.html @@ -1,14 +1,22 @@ -Channel.join - java-phoenix-channel +Channel.join - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / join
+phoenix-channel / ch.kuon.phoenix / Channel / join

join

fun join(timeout: Int = this.timeout): Push +

Join the channel.

+

Parameters

+

+timeout - Timeout in milliseconds, +socket timeout will be used by default.

+

Return
+A push that can be used to receive the messages returned +by the server on the join.

diff --git a/docs/ch.kuon.phoenix/-channel/leave.html b/docs/ch.kuon.phoenix/-channel/leave.html index 557b171..e37f05a 100644 --- a/docs/ch.kuon.phoenix/-channel/leave.html +++ b/docs/ch.kuon.phoenix/-channel/leave.html @@ -1,14 +1,22 @@ -Channel.leave - java-phoenix-channel +Channel.leave - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / leave
+phoenix-channel / ch.kuon.phoenix / Channel / leave

leave

fun leave(timeout: Int = this.timeout): Push +

Leave a channel

+

Parameters

+

+timeout - TODO:description

+

+timeout - Timeout, default to socket timeout

+

Return
+A push that can be used for chaining

diff --git a/docs/ch.kuon.phoenix/-channel/off.html b/docs/ch.kuon.phoenix/-channel/off.html index 5ddef03..3225c6a 100644 --- a/docs/ch.kuon.phoenix/-channel/off.html +++ b/docs/ch.kuon.phoenix/-channel/off.html @@ -1,14 +1,22 @@ -Channel.off - java-phoenix-channel +Channel.off - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / off
+phoenix-channel / ch.kuon.phoenix / Channel / off

off

fun off(event: String, ref: Ref? = null): Unit +

Unregister a callback

+

Parameters

+

+event - The event name to unregister the callback for. +This must match what was passed to Channel.on.

+

+ref - The ref returned by Channel.on, can be ommited +to unregister all callbacks for a particular event.

diff --git a/docs/ch.kuon.phoenix/-channel/on-close.html b/docs/ch.kuon.phoenix/-channel/on-close.html index 0d057c2..701489b 100644 --- a/docs/ch.kuon.phoenix/-channel/on-close.html +++ b/docs/ch.kuon.phoenix/-channel/on-close.html @@ -1,14 +1,21 @@ -Channel.onClose - java-phoenix-channel +Channel.onClose - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / onClose
+phoenix-channel / ch.kuon.phoenix / Channel / onClose

onClose

fun onClose(callback: () -> Unit): Ref +

Register a close callback

+

Note: the callback might be called on another thread

+

Parameters

+

+callback - A callback called when the channel is closed

+

Return
+A ref that can be used with Channel.off

diff --git a/docs/ch.kuon.phoenix/-channel/on-error.html b/docs/ch.kuon.phoenix/-channel/on-error.html index 2b97c8e..55dc772 100644 --- a/docs/ch.kuon.phoenix/-channel/on-error.html +++ b/docs/ch.kuon.phoenix/-channel/on-error.html @@ -1,14 +1,21 @@ -Channel.onError - java-phoenix-channel +Channel.onError - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / onError
+phoenix-channel / ch.kuon.phoenix / Channel / onError

onError

fun onError(callback: (String) -> Unit): Ref +

Register an error callback

+

Note: the callback might be called on another thread

+

Parameters

+

+callback - A callback called when the channel has an error

+

Return
+A ref that can be used with Channel.off

diff --git a/docs/ch.kuon.phoenix/-channel/on.html b/docs/ch.kuon.phoenix/-channel/on.html index d94819e..80cd827 100644 --- a/docs/ch.kuon.phoenix/-channel/on.html +++ b/docs/ch.kuon.phoenix/-channel/on.html @@ -1,14 +1,24 @@ -Channel.on - java-phoenix-channel +Channel.on - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / on
+phoenix-channel / ch.kuon.phoenix / Channel / on

on

fun on(event: String, callback: (Message) -> Unit): Ref +

Register a callback on arbitrary event

+

Note: the callback might be called on another thread

+

Parameters

+

+event - The event to register the callback for

+

+callback - A callback called when the channel receive a +message for the given event

+

Return
+A ref that can be used with Channel.off

diff --git a/docs/ch.kuon.phoenix/-channel/params.html b/docs/ch.kuon.phoenix/-channel/params.html index 00cb41a..347f718 100644 --- a/docs/ch.kuon.phoenix/-channel/params.html +++ b/docs/ch.kuon.phoenix/-channel/params.html @@ -1,11 +1,11 @@ -Channel.params - java-phoenix-channel +Channel.params - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / params
+phoenix-channel / ch.kuon.phoenix / Channel / params

params

diff --git a/docs/ch.kuon.phoenix/-channel/push.html b/docs/ch.kuon.phoenix/-channel/push.html index 3f68b97..a2b70eb 100644 --- a/docs/ch.kuon.phoenix/-channel/push.html +++ b/docs/ch.kuon.phoenix/-channel/push.html @@ -1,14 +1,24 @@ -Channel.push - java-phoenix-channel +Channel.push - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / push
+phoenix-channel / ch.kuon.phoenix / Channel / push

push

fun push(event: String, payload: JSONObject = JSONObject(), timeout: Int = this.timeout): Push +

Push a message to the channel.

+

Parameters

+

+event - Event name

+

+payload - Arbitrary payload

+

+timeout - Timeout, default to socket timeout

+

Return
+A push that can be used for chaining

diff --git a/docs/ch.kuon.phoenix/-channel/socket.html b/docs/ch.kuon.phoenix/-channel/socket.html index 0d19968..c8ad805 100644 --- a/docs/ch.kuon.phoenix/-channel/socket.html +++ b/docs/ch.kuon.phoenix/-channel/socket.html @@ -1,11 +1,11 @@ -Channel.socket - java-phoenix-channel +Channel.socket - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / socket
+phoenix-channel / ch.kuon.phoenix / Channel / socket

socket

diff --git a/docs/ch.kuon.phoenix/-channel/to-string.html b/docs/ch.kuon.phoenix/-channel/to-string.html index b16af32..938c45c 100644 --- a/docs/ch.kuon.phoenix/-channel/to-string.html +++ b/docs/ch.kuon.phoenix/-channel/to-string.html @@ -1,11 +1,11 @@ -Channel.toString - java-phoenix-channel +Channel.toString - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / toString
+phoenix-channel / ch.kuon.phoenix / Channel / toString

toString

diff --git a/docs/ch.kuon.phoenix/-channel/topic.html b/docs/ch.kuon.phoenix/-channel/topic.html index 210b432..648395c 100644 --- a/docs/ch.kuon.phoenix/-channel/topic.html +++ b/docs/ch.kuon.phoenix/-channel/topic.html @@ -1,11 +1,11 @@ -Channel.topic - java-phoenix-channel +Channel.topic - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Channel / topic
+phoenix-channel / ch.kuon.phoenix / Channel / topic

topic

diff --git a/docs/ch.kuon.phoenix/-ex-timer/-init-.html b/docs/ch.kuon.phoenix/-ex-timer/-init-.html index ff67e0d..e30c92c 100644 --- a/docs/ch.kuon.phoenix/-ex-timer/-init-.html +++ b/docs/ch.kuon.phoenix/-ex-timer/-init-.html @@ -1,15 +1,44 @@ -ExTimer.<init> - java-phoenix-channel +ExTimer.<init> - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / ExTimer / <init>
+phoenix-channel / ch.kuon.phoenix / ExTimer / <init>

<init>

ExTimer(callback: Callback, timerCalc: (Int) -> Int)

Exponential backoff timer

+

Example from tests:

+
val waiter = Waiter()
+
+var counter = 0
+val timer = ExTimer({
+    counter++
+    waiter.resume()
+}, { tries ->
+    tries * 1000
+})
+// This is for the example, if you call
+// scheduleTimeout() in a row, the last call "wins"
+// This example will call the callback only once after
+// 4 seconds then once again after 1 second
+timer.scheduleTimeout() // fires after 1000
+timer.scheduleTimeout() // fires after 2000
+timer.scheduleTimeout() // fires after 3000
+timer.reset()
+timer.scheduleTimeout() // fires after 1000
+timer.scheduleTimeout() // fires after 2000
+timer.scheduleTimeout() // fires after 3000
+timer.scheduleTimeout() // fires after 4000
+waiter.await(5000, 1)
+waiter.assertEquals(1, counter)
+
+timer.reset()
+timer.scheduleTimeout() // fires after 1000
+waiter.await(2000, 1)
+waiter.assertEquals(2, counter)
diff --git a/docs/ch.kuon.phoenix/-ex-timer/callback.html b/docs/ch.kuon.phoenix/-ex-timer/callback.html index 51ecca5..04202c8 100644 --- a/docs/ch.kuon.phoenix/-ex-timer/callback.html +++ b/docs/ch.kuon.phoenix/-ex-timer/callback.html @@ -1,11 +1,11 @@ -ExTimer.callback - java-phoenix-channel +ExTimer.callback - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / ExTimer / callback
+phoenix-channel / ch.kuon.phoenix / ExTimer / callback

callback

diff --git a/docs/ch.kuon.phoenix/-ex-timer/index.html b/docs/ch.kuon.phoenix/-ex-timer/index.html index 9cc7dfb..39d4213 100644 --- a/docs/ch.kuon.phoenix/-ex-timer/index.html +++ b/docs/ch.kuon.phoenix/-ex-timer/index.html @@ -1,15 +1,44 @@ -ExTimer - java-phoenix-channel +ExTimer - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / ExTimer
+phoenix-channel / ch.kuon.phoenix / ExTimer

ExTimer

class ExTimer

Exponential backoff timer

+

Example from tests:

+
val waiter = Waiter()
+
+var counter = 0
+val timer = ExTimer({
+    counter++
+    waiter.resume()
+}, { tries ->
+    tries * 1000
+})
+// This is for the example, if you call
+// scheduleTimeout() in a row, the last call "wins"
+// This example will call the callback only once after
+// 4 seconds then once again after 1 second
+timer.scheduleTimeout() // fires after 1000
+timer.scheduleTimeout() // fires after 2000
+timer.scheduleTimeout() // fires after 3000
+timer.reset()
+timer.scheduleTimeout() // fires after 1000
+timer.scheduleTimeout() // fires after 2000
+timer.scheduleTimeout() // fires after 3000
+timer.scheduleTimeout() // fires after 4000
+waiter.await(5000, 1)
+waiter.assertEquals(1, counter)
+
+timer.reset()
+timer.scheduleTimeout() // fires after 1000
+waiter.await(2000, 1)
+waiter.assertEquals(2, counter)

Constructors

+

Join the channel.

fun join(timeout: Int = this.timeout): Push
+

Leave a channel

fun leave(timeout: Int = this.timeout): Push
+

Unregister a callback

fun off(event: String, ref: Ref? = null): Unit
+

Register a callback on arbitrary event

fun on(event: String, callback: (Message) -> Unit): Ref
+

Register a close callback

fun onClose(callback: () -> Unit): Ref
+

Register an error callback

fun onError(callback: (String) -> Unit): Ref
+

Push a message to the channel.

fun push(event: String, payload: JSONObject = JSONObject(), timeout: Int = this.timeout): Push
@@ -46,11 +75,7 @@

timer

timerCalc

@@ -70,6 +95,7 @@

Functions

reset

@@ -77,6 +103,7 @@

reset

scheduleTimeout

diff --git a/docs/ch.kuon.phoenix/-ex-timer/reset.html b/docs/ch.kuon.phoenix/-ex-timer/reset.html index 6ac472a..c38eab5 100644 --- a/docs/ch.kuon.phoenix/-ex-timer/reset.html +++ b/docs/ch.kuon.phoenix/-ex-timer/reset.html @@ -1,14 +1,15 @@ -ExTimer.reset - java-phoenix-channel +ExTimer.reset - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / ExTimer / reset
+phoenix-channel / ch.kuon.phoenix / ExTimer / reset

reset

fun reset(): Unit +

Reset the timeout and cancel the timer if it is scheduled.

diff --git a/docs/ch.kuon.phoenix/-ex-timer/schedule-timeout.html b/docs/ch.kuon.phoenix/-ex-timer/schedule-timeout.html index 06397c7..1c0b722 100644 --- a/docs/ch.kuon.phoenix/-ex-timer/schedule-timeout.html +++ b/docs/ch.kuon.phoenix/-ex-timer/schedule-timeout.html @@ -1,14 +1,15 @@ -ExTimer.scheduleTimeout - java-phoenix-channel +ExTimer.scheduleTimeout - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / ExTimer / scheduleTimeout
+phoenix-channel / ch.kuon.phoenix / ExTimer / scheduleTimeout

scheduleTimeout

fun scheduleTimeout(): Unit +

Schedule the timer to run once

diff --git a/docs/ch.kuon.phoenix/-ex-timer/timer-calc.html b/docs/ch.kuon.phoenix/-ex-timer/timer-calc.html index 12dd150..1c2146f 100644 --- a/docs/ch.kuon.phoenix/-ex-timer/timer-calc.html +++ b/docs/ch.kuon.phoenix/-ex-timer/timer-calc.html @@ -1,26 +1,34 @@ -ExTimer.timerCalc - java-phoenix-channel +ExTimer.timerCalc - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / ExTimer / timerCalc
+phoenix-channel / ch.kuon.phoenix / ExTimer / timerCalc

timerCalc

var timerCalc: (Int) -> Int -

A function that is called when the timer is scheduled. - It is called with the current try and must return a - time in miliseconds. It is used to implement exponential - timers. First value of tries is 1. - Example: { tries -> min(tries * tries * 1000, 60000) }

+

A function that is called when the timer is scheduled.

+

It is called with the current try and must return a +time in miliseconds.

+

It is used to implement exponential timers.

+

First value of tries is 1.

Property

-timerCalc - A function that is called when the timer is scheduled. - It is called with the current try and must return a - time in miliseconds. It is used to implement exponential - timers. First value of tries is 1. - Example: { tries -> min(tries * tries * 1000, 60000) }

+timerCalc - +

A function that is called when the timer is scheduled.

+ + +

It is called with the current try and must return a +time in miliseconds.

+ + +

It is used to implement exponential timers.

+ + +

First value of tries is 1.

+

diff --git a/docs/ch.kuon.phoenix/-ex-timer/timer.html b/docs/ch.kuon.phoenix/-ex-timer/timer.html index 86ab8cc..24f7cf6 100644 --- a/docs/ch.kuon.phoenix/-ex-timer/timer.html +++ b/docs/ch.kuon.phoenix/-ex-timer/timer.html @@ -1,11 +1,11 @@ -ExTimer.timer - java-phoenix-channel +ExTimer.timer - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / ExTimer / timer
+phoenix-channel / ch.kuon.phoenix / ExTimer / timer

timer

diff --git a/docs/ch.kuon.phoenix/-ex-timer/tries.html b/docs/ch.kuon.phoenix/-ex-timer/tries.html index a1332a6..91ff250 100644 --- a/docs/ch.kuon.phoenix/-ex-timer/tries.html +++ b/docs/ch.kuon.phoenix/-ex-timer/tries.html @@ -1,11 +1,11 @@ -ExTimer.tries - java-phoenix-channel +ExTimer.tries - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / ExTimer / tries
+phoenix-channel / ch.kuon.phoenix / ExTimer / tries

tries

diff --git a/docs/ch.kuon.phoenix/-library-test/-init-.html b/docs/ch.kuon.phoenix/-library-test/-init-.html new file mode 100644 index 0000000..acec2c5 --- /dev/null +++ b/docs/ch.kuon.phoenix/-library-test/-init-.html @@ -0,0 +1,14 @@ + + + +LibraryTest.<init> - phoenix-channel + + + +phoenix-channel / ch.kuon.phoenix / LibraryTest / <init>
+
+

<init>

+ +LibraryTest() + + diff --git a/docs/ch.kuon.phoenix/-library-test/index.html b/docs/ch.kuon.phoenix/-library-test/index.html new file mode 100644 index 0000000..bdac163 --- /dev/null +++ b/docs/ch.kuon.phoenix/-library-test/index.html @@ -0,0 +1,79 @@ + + + +LibraryTest - phoenix-channel + + + +phoenix-channel / ch.kuon.phoenix / LibraryTest
+
+

LibraryTest

+class LibraryTest +

Constructors

+
-

A function that is called when the timer is scheduled. - It is called with the current try and must return a - time in miliseconds. It is used to implement exponential - timers. First value of tries is 1. - Example: { tries -> min(tries * tries * 1000, 60000) }

+

A function that is called when the timer is scheduled.

var timerCalc: (Int) -> Int
+

Reset the timeout and cancel the timer if it is scheduled.

fun reset(): Unit
+

Schedule the timer to run once

fun scheduleTimeout(): Unit
+ + + + + + +
+

<init>

+
+LibraryTest()
+

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

testBroadcast

+
+fun testBroadcast(): Unit
+

testConnect

+
+fun testConnect(): Unit
+

testEcho

+
+fun testEcho(): Unit
+

testJoinError

+
+fun testJoinError(): Unit
+

testPresence

+
+fun testPresence(): Unit
+

testTimer

+
+fun testTimer(): Unit
+

testURL

+
+fun testURL(): Unit
+ + diff --git a/docs/ch.kuon.phoenix/-library-test/test-broadcast.html b/docs/ch.kuon.phoenix/-library-test/test-broadcast.html new file mode 100644 index 0000000..3b391cd --- /dev/null +++ b/docs/ch.kuon.phoenix/-library-test/test-broadcast.html @@ -0,0 +1,14 @@ + + + +LibraryTest.testBroadcast - phoenix-channel + + + +phoenix-channel / ch.kuon.phoenix / LibraryTest / testBroadcast
+
+

testBroadcast

+ +fun testBroadcast(): Unit + + diff --git a/docs/ch.kuon.phoenix/-library-test/test-connect.html b/docs/ch.kuon.phoenix/-library-test/test-connect.html new file mode 100644 index 0000000..205885d --- /dev/null +++ b/docs/ch.kuon.phoenix/-library-test/test-connect.html @@ -0,0 +1,14 @@ + + + +LibraryTest.testConnect - phoenix-channel + + + +phoenix-channel / ch.kuon.phoenix / LibraryTest / testConnect
+
+

testConnect

+ +fun testConnect(): Unit + + diff --git a/docs/ch.kuon.phoenix/-library-test/test-echo.html b/docs/ch.kuon.phoenix/-library-test/test-echo.html new file mode 100644 index 0000000..694995b --- /dev/null +++ b/docs/ch.kuon.phoenix/-library-test/test-echo.html @@ -0,0 +1,14 @@ + + + +LibraryTest.testEcho - phoenix-channel + + + +phoenix-channel / ch.kuon.phoenix / LibraryTest / testEcho
+
+

testEcho

+ +fun testEcho(): Unit + + diff --git a/docs/ch.kuon.phoenix/-library-test/test-join-error.html b/docs/ch.kuon.phoenix/-library-test/test-join-error.html new file mode 100644 index 0000000..29ba032 --- /dev/null +++ b/docs/ch.kuon.phoenix/-library-test/test-join-error.html @@ -0,0 +1,14 @@ + + + +LibraryTest.testJoinError - phoenix-channel + + + +phoenix-channel / ch.kuon.phoenix / LibraryTest / testJoinError
+
+

testJoinError

+ +fun testJoinError(): Unit + + diff --git a/docs/ch.kuon.phoenix/-library-test/test-presence.html b/docs/ch.kuon.phoenix/-library-test/test-presence.html new file mode 100644 index 0000000..38c454c --- /dev/null +++ b/docs/ch.kuon.phoenix/-library-test/test-presence.html @@ -0,0 +1,14 @@ + + + +LibraryTest.testPresence - phoenix-channel + + + +phoenix-channel / ch.kuon.phoenix / LibraryTest / testPresence
+
+

testPresence

+ +fun testPresence(): Unit + + diff --git a/docs/ch.kuon.phoenix/-library-test/test-timer.html b/docs/ch.kuon.phoenix/-library-test/test-timer.html new file mode 100644 index 0000000..6a694f4 --- /dev/null +++ b/docs/ch.kuon.phoenix/-library-test/test-timer.html @@ -0,0 +1,14 @@ + + + +LibraryTest.testTimer - phoenix-channel + + + +phoenix-channel / ch.kuon.phoenix / LibraryTest / testTimer
+
+

testTimer

+ +fun testTimer(): Unit + + diff --git a/docs/ch.kuon.phoenix/-library-test/test-u-r-l.html b/docs/ch.kuon.phoenix/-library-test/test-u-r-l.html new file mode 100644 index 0000000..9b727c9 --- /dev/null +++ b/docs/ch.kuon.phoenix/-library-test/test-u-r-l.html @@ -0,0 +1,14 @@ + + + +LibraryTest.testURL - phoenix-channel + + + +phoenix-channel / ch.kuon.phoenix / LibraryTest / testURL
+
+

testURL

+ +fun testURL(): Unit + + diff --git a/docs/ch.kuon.phoenix/-presence/-diff/-init-.html b/docs/ch.kuon.phoenix/-presence/-diff/-init-.html deleted file mode 100644 index e58d75d..0000000 --- a/docs/ch.kuon.phoenix/-presence/-diff/-init-.html +++ /dev/null @@ -1,14 +0,0 @@ - - - -Presence.Diff.<init> - java-phoenix-channel - - - -java-phoenix-channel / ch.kuon.phoenix / Presence / Diff / <init>
-
-

<init>

- -Diff(joins: HashMap<String, Entry>, leaves: HashMap<String, Entry>) - - diff --git a/docs/ch.kuon.phoenix/-presence/-diff/index.html b/docs/ch.kuon.phoenix/-presence/-diff/index.html deleted file mode 100644 index 6322f1c..0000000 --- a/docs/ch.kuon.phoenix/-presence/-diff/index.html +++ /dev/null @@ -1,44 +0,0 @@ - - - -Presence.Diff - java-phoenix-channel - - - -java-phoenix-channel / ch.kuon.phoenix / Presence / Diff
-
-

Diff

-class Diff -

Constructors

- - - - - - - -
-

<init>

-
-Diff(joins: HashMap<String, Entry>, leaves: HashMap<String, Entry>)
-

Properties

- - - - - - - - - - - -
-

joins

-
-val joins: HashMap<String, Entry>
-

leaves

-
-val leaves: HashMap<String, Entry>
- - diff --git a/docs/ch.kuon.phoenix/-presence/-diff/joins.html b/docs/ch.kuon.phoenix/-presence/-diff/joins.html deleted file mode 100644 index 1286972..0000000 --- a/docs/ch.kuon.phoenix/-presence/-diff/joins.html +++ /dev/null @@ -1,14 +0,0 @@ - - - -Presence.Diff.joins - java-phoenix-channel - - - -java-phoenix-channel / ch.kuon.phoenix / Presence / Diff / joins
-
-

joins

- -val joins: HashMap<String, Entry> - - diff --git a/docs/ch.kuon.phoenix/-presence/-diff/leaves.html b/docs/ch.kuon.phoenix/-presence/-diff/leaves.html deleted file mode 100644 index 7818171..0000000 --- a/docs/ch.kuon.phoenix/-presence/-diff/leaves.html +++ /dev/null @@ -1,14 +0,0 @@ - - - -Presence.Diff.leaves - java-phoenix-channel - - - -java-phoenix-channel / ch.kuon.phoenix / Presence / Diff / leaves
-
-

leaves

- -val leaves: HashMap<String, Entry> - - diff --git a/docs/ch.kuon.phoenix/-presence/-entry/-init-.html b/docs/ch.kuon.phoenix/-presence/-entry/-init-.html index 88c5167..8a391e6 100644 --- a/docs/ch.kuon.phoenix/-presence/-entry/-init-.html +++ b/docs/ch.kuon.phoenix/-presence/-entry/-init-.html @@ -1,14 +1,18 @@ -Presence.Entry.<init> - java-phoenix-channel +Presence.Entry.<init> - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Presence / Entry / <init>
+phoenix-channel / ch.kuon.phoenix / Presence / Entry / <init>

<init>

-Entry(str: String) +Entry(rawData: String) +

A presence entry

+

While presence are JSONObject subclasses, they should be considered +immutable.

+

Presence entries are returned by Presence.list and other callbacks.

diff --git a/docs/ch.kuon.phoenix/-presence/-entry/get-metas.html b/docs/ch.kuon.phoenix/-presence/-entry/get-metas.html new file mode 100644 index 0000000..74e0c3a --- /dev/null +++ b/docs/ch.kuon.phoenix/-presence/-entry/get-metas.html @@ -0,0 +1,17 @@ + + + +Presence.Entry.getMetas - phoenix-channel + + + +phoenix-channel / ch.kuon.phoenix / Presence / Entry / getMetas
+
+

getMetas

+ +fun getMetas(): JSONArray +

The presence meta data

+

This is an arbitrary array and the format depends on your +implementation.

+ + diff --git a/docs/ch.kuon.phoenix/-presence/-entry/index.html b/docs/ch.kuon.phoenix/-presence/-entry/index.html index f9f1840..78415c0 100644 --- a/docs/ch.kuon.phoenix/-presence/-entry/index.html +++ b/docs/ch.kuon.phoenix/-presence/-entry/index.html @@ -1,14 +1,18 @@ -Presence.Entry - java-phoenix-channel +Presence.Entry - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Presence / Entry
+phoenix-channel / ch.kuon.phoenix / Presence / Entry

Entry

class Entry : JSONObject +

A presence entry

+

While presence are JSONObject subclasses, they should be considered +immutable.

+

Presence entries are returned by Presence.list and other callbacks.

Constructors

@@ -17,7 +21,8 @@

Constructors

<init>

+

A presence entry

+Entry(rawData: String)
-Entry(str: String)
@@ -26,17 +31,11 @@

Properties

-

metas

+

rawData

-val metas: JSONArray! - - - -

str

- - -val str: String +

The JSON string that sent by the server

+val rawData: String @@ -45,18 +44,11 @@

Functions

-

prependMetas

- - -fun prependMetas(newMetas: List<JSONObject>): Unit - - - -

setMetas

+

getMetas

-fun setMetas(metas: JSONArray): Unit
-fun setMetas(metas: List<JSONObject>): Unit +

The presence meta data

+fun getMetas(): JSONArray diff --git a/docs/ch.kuon.phoenix/-presence/-entry/metas.html b/docs/ch.kuon.phoenix/-presence/-entry/metas.html deleted file mode 100644 index 0e41672..0000000 --- a/docs/ch.kuon.phoenix/-presence/-entry/metas.html +++ /dev/null @@ -1,14 +0,0 @@ - - - -Presence.Entry.metas - java-phoenix-channel - - - -java-phoenix-channel / ch.kuon.phoenix / Presence / Entry / metas
-
-

metas

- -val metas: JSONArray! - - diff --git a/docs/ch.kuon.phoenix/-presence/-entry/prepend-metas.html b/docs/ch.kuon.phoenix/-presence/-entry/prepend-metas.html deleted file mode 100644 index e41a54d..0000000 --- a/docs/ch.kuon.phoenix/-presence/-entry/prepend-metas.html +++ /dev/null @@ -1,14 +0,0 @@ - - - -Presence.Entry.prependMetas - java-phoenix-channel - - - -java-phoenix-channel / ch.kuon.phoenix / Presence / Entry / prependMetas
-
-

prependMetas

- -fun prependMetas(newMetas: List<JSONObject>): Unit - - diff --git a/docs/ch.kuon.phoenix/-presence/-entry/raw-data.html b/docs/ch.kuon.phoenix/-presence/-entry/raw-data.html new file mode 100644 index 0000000..bdbfc90 --- /dev/null +++ b/docs/ch.kuon.phoenix/-presence/-entry/raw-data.html @@ -0,0 +1,18 @@ + + + +Presence.Entry.rawData - phoenix-channel + + + +phoenix-channel / ch.kuon.phoenix / Presence / Entry / rawData
+
+

rawData

+ +val rawData: String +

The JSON string that sent by the server

+

Property

+

+rawData - The JSON string that sent by the server

+ + diff --git a/docs/ch.kuon.phoenix/-presence/-entry/set-metas.html b/docs/ch.kuon.phoenix/-presence/-entry/set-metas.html deleted file mode 100644 index 4789523..0000000 --- a/docs/ch.kuon.phoenix/-presence/-entry/set-metas.html +++ /dev/null @@ -1,16 +0,0 @@ - - - -Presence.Entry.setMetas - java-phoenix-channel - - - -java-phoenix-channel / ch.kuon.phoenix / Presence / Entry / setMetas
-
-

setMetas

- -fun setMetas(metas: JSONArray): Unit
- -fun setMetas(metas: List<JSONObject>): Unit - - diff --git a/docs/ch.kuon.phoenix/-presence/-entry/str.html b/docs/ch.kuon.phoenix/-presence/-entry/str.html deleted file mode 100644 index b5edff2..0000000 --- a/docs/ch.kuon.phoenix/-presence/-entry/str.html +++ /dev/null @@ -1,14 +0,0 @@ - - - -Presence.Entry.str - java-phoenix-channel - - - -java-phoenix-channel / ch.kuon.phoenix / Presence / Entry / str
-
-

str

- -val str: String - - diff --git a/docs/ch.kuon.phoenix/-presence/-init-.html b/docs/ch.kuon.phoenix/-presence/-init-.html index 40a7b3e..a20ff6d 100644 --- a/docs/ch.kuon.phoenix/-presence/-init-.html +++ b/docs/ch.kuon.phoenix/-presence/-init-.html @@ -1,14 +1,15 @@ -Presence.<init> - java-phoenix-channel +Presence.<init> - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Presence / <init>
+phoenix-channel / ch.kuon.phoenix / Presence / <init>

<init>

Presence(channel: Channel, opts: Options = Options()) +

Listen for presence changes

diff --git a/docs/ch.kuon.phoenix/-presence/-options/-event-names/-init-.html b/docs/ch.kuon.phoenix/-presence/-options/-event-names/-init-.html index 70f321a..d647121 100644 --- a/docs/ch.kuon.phoenix/-presence/-options/-event-names/-init-.html +++ b/docs/ch.kuon.phoenix/-presence/-options/-event-names/-init-.html @@ -1,11 +1,11 @@ -Presence.Options.EventNames.<init> - java-phoenix-channel +Presence.Options.EventNames.<init> - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Presence / Options / EventNames / <init>
+phoenix-channel / ch.kuon.phoenix / Presence / Options / EventNames / <init>

<init>

diff --git a/docs/ch.kuon.phoenix/-presence/-options/-event-names/diff.html b/docs/ch.kuon.phoenix/-presence/-options/-event-names/diff.html index 80b1078..138ee37 100644 --- a/docs/ch.kuon.phoenix/-presence/-options/-event-names/diff.html +++ b/docs/ch.kuon.phoenix/-presence/-options/-event-names/diff.html @@ -1,11 +1,11 @@ -Presence.Options.EventNames.diff - java-phoenix-channel +Presence.Options.EventNames.diff - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Presence / Options / EventNames / diff
+phoenix-channel / ch.kuon.phoenix / Presence / Options / EventNames / diff

diff

diff --git a/docs/ch.kuon.phoenix/-presence/-options/-event-names/index.html b/docs/ch.kuon.phoenix/-presence/-options/-event-names/index.html index 5a360e7..f90b8d5 100644 --- a/docs/ch.kuon.phoenix/-presence/-options/-event-names/index.html +++ b/docs/ch.kuon.phoenix/-presence/-options/-event-names/index.html @@ -1,11 +1,11 @@ -Presence.Options.EventNames - java-phoenix-channel +Presence.Options.EventNames - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Presence / Options / EventNames
+phoenix-channel / ch.kuon.phoenix / Presence / Options / EventNames

EventNames

class EventNames diff --git a/docs/ch.kuon.phoenix/-presence/-options/-event-names/state.html b/docs/ch.kuon.phoenix/-presence/-options/-event-names/state.html index 77a1a45..84d2632 100644 --- a/docs/ch.kuon.phoenix/-presence/-options/-event-names/state.html +++ b/docs/ch.kuon.phoenix/-presence/-options/-event-names/state.html @@ -1,11 +1,11 @@ -Presence.Options.EventNames.state - java-phoenix-channel +Presence.Options.EventNames.state - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Presence / Options / EventNames / state
+phoenix-channel / ch.kuon.phoenix / Presence / Options / EventNames / state

state

diff --git a/docs/ch.kuon.phoenix/-presence/-options/-init-.html b/docs/ch.kuon.phoenix/-presence/-options/-init-.html index a7e2daf..fabee7e 100644 --- a/docs/ch.kuon.phoenix/-presence/-options/-init-.html +++ b/docs/ch.kuon.phoenix/-presence/-options/-init-.html @@ -1,14 +1,17 @@ -Presence.Options.<init> - java-phoenix-channel +Presence.Options.<init> - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Presence / Options / <init>
+phoenix-channel / ch.kuon.phoenix / Presence / Options / <init>

<init>

Options(eventNames: EventNames = EventNames("presence_state", "presence_diff")) +

Presence options

+

Default options should be used except for special requirements. +They line up with phoenix default options.

diff --git a/docs/ch.kuon.phoenix/-presence/-options/event-names.html b/docs/ch.kuon.phoenix/-presence/-options/event-names.html index 1e97056..7895b58 100644 --- a/docs/ch.kuon.phoenix/-presence/-options/event-names.html +++ b/docs/ch.kuon.phoenix/-presence/-options/event-names.html @@ -1,11 +1,11 @@ -Presence.Options.eventNames - java-phoenix-channel +Presence.Options.eventNames - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Presence / Options / eventNames
+phoenix-channel / ch.kuon.phoenix / Presence / Options / eventNames

eventNames

diff --git a/docs/ch.kuon.phoenix/-presence/-options/index.html b/docs/ch.kuon.phoenix/-presence/-options/index.html index 07f8233..1615e09 100644 --- a/docs/ch.kuon.phoenix/-presence/-options/index.html +++ b/docs/ch.kuon.phoenix/-presence/-options/index.html @@ -1,14 +1,17 @@ -Presence.Options - java-phoenix-channel +Presence.Options - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Presence / Options
+phoenix-channel / ch.kuon.phoenix / Presence / Options

Options

class Options +

Presence options

+

Default options should be used except for special requirements. +They line up with phoenix default options.

Types

@@ -29,6 +32,7 @@

Constructors

<init>

diff --git a/docs/ch.kuon.phoenix/-presence/channel.html b/docs/ch.kuon.phoenix/-presence/channel.html index f5208c4..b0bebca 100644 --- a/docs/ch.kuon.phoenix/-presence/channel.html +++ b/docs/ch.kuon.phoenix/-presence/channel.html @@ -1,14 +1,18 @@ -Presence.channel - java-phoenix-channel +Presence.channel - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Presence / channel
+phoenix-channel / ch.kuon.phoenix / Presence / channel

channel

val channel: Channel +

A channel

+

Property

+

+channel - A channel

diff --git a/docs/ch.kuon.phoenix/-presence/clone.html b/docs/ch.kuon.phoenix/-presence/clone.html deleted file mode 100644 index eecc109..0000000 --- a/docs/ch.kuon.phoenix/-presence/clone.html +++ /dev/null @@ -1,16 +0,0 @@ - - - -Presence.clone - java-phoenix-channel - - - -java-phoenix-channel / ch.kuon.phoenix / Presence / clone
-
-

clone

- -fun clone(obj: HashMap<String, Entry>): HashMap<String, Entry>
- -fun clone(entry: Entry): Entry - - diff --git a/docs/ch.kuon.phoenix/-presence/in-pending-sync-state.html b/docs/ch.kuon.phoenix/-presence/in-pending-sync-state.html index 88105ae..a2d3e03 100644 --- a/docs/ch.kuon.phoenix/-presence/in-pending-sync-state.html +++ b/docs/ch.kuon.phoenix/-presence/in-pending-sync-state.html @@ -1,14 +1,15 @@ -Presence.inPendingSyncState - java-phoenix-channel +Presence.inPendingSyncState - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Presence / inPendingSyncState
+phoenix-channel / ch.kuon.phoenix / Presence / inPendingSyncState

inPendingSyncState

fun inPendingSyncState(): Boolean +

Is there any pendinng sync state

diff --git a/docs/ch.kuon.phoenix/-presence/index.html b/docs/ch.kuon.phoenix/-presence/index.html index 2f432f2..c5a1996 100644 --- a/docs/ch.kuon.phoenix/-presence/index.html +++ b/docs/ch.kuon.phoenix/-presence/index.html @@ -1,29 +1,24 @@ -Presence - java-phoenix-channel +Presence - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Presence
+phoenix-channel / ch.kuon.phoenix / Presence

Presence

class Presence +

Listen for presence changes

Types

+

Presence options

Options(eventNames: EventNames = EventNames("presence_state", "presence_diff"))
- - - - @@ -31,6 +26,7 @@

Entry

Options

@@ -43,6 +39,7 @@

Constructors

<init>

@@ -55,6 +52,7 @@

Properties

channel

@@ -62,6 +60,7 @@

channel

opts

@@ -74,6 +73,7 @@

Functions

inPendingSyncState

@@ -81,6 +81,7 @@

inPendingSyncState

list

@@ -109,46 +110,5 @@

onSync

-

Diff

-
-class Diff

Entry

+

A presence entry

class Entry : JSONObject
+

Presence options

class Options
+

Listen for presence changes

Presence(channel: Channel, opts: Options = Options())
+

A channel

val channel: Channel
+

Options

val opts: Options
+

Is there any pendinng sync state

fun inPendingSyncState(): Boolean
+

Returns the list of presence

fun list(by: (String, Entry) -> Entry = { _, p -> p }): List<Entry>
-

Companion Object Functions

- - - - - - - - - - - - - - - - - - - - - - - -
-

clone

-
-fun clone(obj: HashMap<String, Entry>): HashMap<String, Entry>
-fun clone(entry: Entry): Entry
-

list

-
-fun list(presences: HashMap<String, Entry>, chooser: (String, Entry) -> Entry = { _, p -> p }): List<Entry>
-

map

-
-fun map(entries: HashMap<String, Entry>, func: (String, Entry) -> Entry): List<Entry>
-

syncDiff

-
-fun syncDiff(currentState: HashMap<String, Entry>, diff: Diff, onJoin: (key: String, currentPresence: Entry?, newPresence: Entry) -> Unit, onLeave: (key: String, currentPresence: Entry?, leftPresence: Entry) -> Unit): HashMap<String, Entry>
-

syncState

-
-fun syncState(currentState: HashMap<String, Entry>, newState: HashMap<String, Entry>, onJoin: (key: String, currentPresence: Entry?, newPresence: Entry) -> Unit, onLeave: (key: String, currentPresence: Entry?, leftPresence: Entry) -> Unit): HashMap<String, Entry>
diff --git a/docs/ch.kuon.phoenix/-presence/list.html b/docs/ch.kuon.phoenix/-presence/list.html index 44a21c4..0efa04f 100644 --- a/docs/ch.kuon.phoenix/-presence/list.html +++ b/docs/ch.kuon.phoenix/-presence/list.html @@ -1,16 +1,16 @@ -Presence.list - java-phoenix-channel +Presence.list - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Presence / list
+phoenix-channel / ch.kuon.phoenix / Presence / list

list

-fun list(by: (String, Entry) -> Entry = { _, p -> p }): List<Entry>
- -fun list(presences: HashMap<String, Entry>, chooser: (String, Entry) -> Entry = { _, p -> p }): List<Entry> +fun list(by: (String, Entry) -> Entry = { _, p -> p }): List<Entry> +

Returns the list of presence

+

This method will return every presence returned by the server

diff --git a/docs/ch.kuon.phoenix/-presence/map.html b/docs/ch.kuon.phoenix/-presence/map.html deleted file mode 100644 index 8512326..0000000 --- a/docs/ch.kuon.phoenix/-presence/map.html +++ /dev/null @@ -1,14 +0,0 @@ - - - -Presence.map - java-phoenix-channel - - - -java-phoenix-channel / ch.kuon.phoenix / Presence / map
-
-

map

- -fun map(entries: HashMap<String, Entry>, func: (String, Entry) -> Entry): List<Entry> - - diff --git a/docs/ch.kuon.phoenix/-presence/on-join.html b/docs/ch.kuon.phoenix/-presence/on-join.html index d8e1e15..8163828 100644 --- a/docs/ch.kuon.phoenix/-presence/on-join.html +++ b/docs/ch.kuon.phoenix/-presence/on-join.html @@ -1,16 +1,17 @@ -Presence.onJoin - java-phoenix-channel +Presence.onJoin - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Presence / onJoin
+phoenix-channel / ch.kuon.phoenix / Presence / onJoin

onJoin

fun onJoin(callback: (key: String, currentPresence: Entry?, newPresence: Entry) -> Unit): Unit

Set the callback for join event

+

Note: the callback might be called on another thread

Parameters

callback - The function to be called on join

diff --git a/docs/ch.kuon.phoenix/-presence/on-leave.html b/docs/ch.kuon.phoenix/-presence/on-leave.html index 5d58146..a405897 100644 --- a/docs/ch.kuon.phoenix/-presence/on-leave.html +++ b/docs/ch.kuon.phoenix/-presence/on-leave.html @@ -1,16 +1,17 @@ -Presence.onLeave - java-phoenix-channel +Presence.onLeave - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Presence / onLeave
+phoenix-channel / ch.kuon.phoenix / Presence / onLeave

onLeave

fun onLeave(callback: (key: String, currentPresence: Entry?, leftPresence: Entry) -> Unit): Unit

Set the callback for leave event

+

Note: the callback might be called on another thread

Parameters

callback - The function to be called on leave

diff --git a/docs/ch.kuon.phoenix/-presence/on-sync.html b/docs/ch.kuon.phoenix/-presence/on-sync.html index 42ed86f..d34acdc 100644 --- a/docs/ch.kuon.phoenix/-presence/on-sync.html +++ b/docs/ch.kuon.phoenix/-presence/on-sync.html @@ -1,16 +1,17 @@ -Presence.onSync - java-phoenix-channel +Presence.onSync - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Presence / onSync
+phoenix-channel / ch.kuon.phoenix / Presence / onSync

onSync

fun onSync(callback: () -> Unit): Unit

Set the callback for sync event

+

Note: the callback might be called on another thread

Parameters

callback - The function to be called on sync

diff --git a/docs/ch.kuon.phoenix/-presence/opts.html b/docs/ch.kuon.phoenix/-presence/opts.html index cf7c807..8ca53d7 100644 --- a/docs/ch.kuon.phoenix/-presence/opts.html +++ b/docs/ch.kuon.phoenix/-presence/opts.html @@ -1,14 +1,18 @@ -Presence.opts - java-phoenix-channel +Presence.opts - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Presence / opts
+phoenix-channel / ch.kuon.phoenix / Presence / opts

opts

val opts: Options +

Options

+

Property

+

+opts - Options

diff --git a/docs/ch.kuon.phoenix/-presence/sync-diff.html b/docs/ch.kuon.phoenix/-presence/sync-diff.html deleted file mode 100644 index f8bee1a..0000000 --- a/docs/ch.kuon.phoenix/-presence/sync-diff.html +++ /dev/null @@ -1,14 +0,0 @@ - - - -Presence.syncDiff - java-phoenix-channel - - - -java-phoenix-channel / ch.kuon.phoenix / Presence / syncDiff
-
-

syncDiff

- -fun syncDiff(currentState: HashMap<String, Entry>, diff: Diff, onJoin: (key: String, currentPresence: Entry?, newPresence: Entry) -> Unit, onLeave: (key: String, currentPresence: Entry?, leftPresence: Entry) -> Unit): HashMap<String, Entry> - - diff --git a/docs/ch.kuon.phoenix/-presence/sync-state.html b/docs/ch.kuon.phoenix/-presence/sync-state.html deleted file mode 100644 index ecf6bfb..0000000 --- a/docs/ch.kuon.phoenix/-presence/sync-state.html +++ /dev/null @@ -1,14 +0,0 @@ - - - -Presence.syncState - java-phoenix-channel - - - -java-phoenix-channel / ch.kuon.phoenix / Presence / syncState
-
-

syncState

- -fun syncState(currentState: HashMap<String, Entry>, newState: HashMap<String, Entry>, onJoin: (key: String, currentPresence: Entry?, newPresence: Entry) -> Unit, onLeave: (key: String, currentPresence: Entry?, leftPresence: Entry) -> Unit): HashMap<String, Entry> - - diff --git a/docs/ch.kuon.phoenix/-socket/-init-.html b/docs/ch.kuon.phoenix/-socket/-init-.html index 0415c12..a639950 100644 --- a/docs/ch.kuon.phoenix/-socket/-init-.html +++ b/docs/ch.kuon.phoenix/-socket/-init-.html @@ -1,14 +1,21 @@ -Socket.<init> - java-phoenix-channel +Socket.<init> - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / <init>
+phoenix-channel / ch.kuon.phoenix / Socket / <init>

<init>

Socket(url: String, opts: Options = Socket.Options()) +

Socket main constructor.

+

This class is a thin layer above websockets. This layer provides +compatibility with Phoenix Sockets. It handle heartbeat, serialization and +provides a simple event based API.

+

When using Phoenix, you will usually not push messages directly to sockets +but use Channels instead.

+

The url can use either the ws:// or wss:// scheme.

diff --git a/docs/ch.kuon.phoenix/-socket/-message/-init-.html b/docs/ch.kuon.phoenix/-socket/-message/-init-.html index 54c3ef6..072edb6 100644 --- a/docs/ch.kuon.phoenix/-socket/-message/-init-.html +++ b/docs/ch.kuon.phoenix/-socket/-message/-init-.html @@ -1,14 +1,17 @@ -Socket.Message.<init> - java-phoenix-channel +Socket.Message.<init> - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / Message / <init>
+phoenix-channel / ch.kuon.phoenix / Socket / Message / <init>

<init>

Message(joinRef: Int? = null, ref: Int? = null, topic: String, event: String, payload: JSONObject = JSONObject()) +

A raw socket message.

+

This object is usually not created directly and Channel.Message +is used instead.

diff --git a/docs/ch.kuon.phoenix/-socket/-message/event.html b/docs/ch.kuon.phoenix/-socket/-message/event.html index 8b22d58..ac6856f 100644 --- a/docs/ch.kuon.phoenix/-socket/-message/event.html +++ b/docs/ch.kuon.phoenix/-socket/-message/event.html @@ -1,14 +1,18 @@ -Socket.Message.event - java-phoenix-channel +Socket.Message.event - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / Message / event
+phoenix-channel / ch.kuon.phoenix / Socket / Message / event

event

var event: String +

The event name

+

Property

+

+event - The event name

diff --git a/docs/ch.kuon.phoenix/-socket/-message/index.html b/docs/ch.kuon.phoenix/-socket/-message/index.html index f6c8fef..5fe4916 100644 --- a/docs/ch.kuon.phoenix/-socket/-message/index.html +++ b/docs/ch.kuon.phoenix/-socket/-message/index.html @@ -1,14 +1,17 @@ -Socket.Message - java-phoenix-channel +Socket.Message - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / Message
+phoenix-channel / ch.kuon.phoenix / Socket / Message

Message

class Message +

A raw socket message.

+

This object is usually not created directly and Channel.Message +is used instead.

Constructors

@@ -17,6 +20,7 @@

Constructors

<init>

@@ -29,6 +33,7 @@

Properties

event

@@ -36,6 +41,7 @@

event

joinRef

@@ -43,6 +49,7 @@

joinRef

payload

@@ -50,6 +57,7 @@

payload

ref

@@ -57,6 +65,7 @@

ref

topic

diff --git a/docs/ch.kuon.phoenix/-socket/-message/join-ref.html b/docs/ch.kuon.phoenix/-socket/-message/join-ref.html index 41c6a16..847284c 100644 --- a/docs/ch.kuon.phoenix/-socket/-message/join-ref.html +++ b/docs/ch.kuon.phoenix/-socket/-message/join-ref.html @@ -1,14 +1,18 @@ -Socket.Message.joinRef - java-phoenix-channel +Socket.Message.joinRef - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / Message / joinRef
+phoenix-channel / ch.kuon.phoenix / Socket / Message / joinRef

joinRef

var joinRef: Int? +

A join_ref

+

Property

+

+joinRef - A join_ref

diff --git a/docs/ch.kuon.phoenix/-socket/-message/payload.html b/docs/ch.kuon.phoenix/-socket/-message/payload.html index 2e941e2..9d624ce 100644 --- a/docs/ch.kuon.phoenix/-socket/-message/payload.html +++ b/docs/ch.kuon.phoenix/-socket/-message/payload.html @@ -1,14 +1,18 @@ -Socket.Message.payload - java-phoenix-channel +Socket.Message.payload - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / Message / payload
+phoenix-channel / ch.kuon.phoenix / Socket / Message / payload

payload

var payload: JSONObject +

A payload object

+

Property

+

+payload - A payload object

diff --git a/docs/ch.kuon.phoenix/-socket/-message/ref.html b/docs/ch.kuon.phoenix/-socket/-message/ref.html index 08a7af1..0e6a584 100644 --- a/docs/ch.kuon.phoenix/-socket/-message/ref.html +++ b/docs/ch.kuon.phoenix/-socket/-message/ref.html @@ -1,14 +1,18 @@ -Socket.Message.ref - java-phoenix-channel +Socket.Message.ref - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / Message / ref
+phoenix-channel / ch.kuon.phoenix / Socket / Message / ref

ref

var ref: Int? +

The ref

+

Property

+

+ref - The ref

diff --git a/docs/ch.kuon.phoenix/-socket/-message/to-string.html b/docs/ch.kuon.phoenix/-socket/-message/to-string.html index 7ac667d..0cd7411 100644 --- a/docs/ch.kuon.phoenix/-socket/-message/to-string.html +++ b/docs/ch.kuon.phoenix/-socket/-message/to-string.html @@ -1,11 +1,11 @@ -Socket.Message.toString - java-phoenix-channel +Socket.Message.toString - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / Message / toString
+phoenix-channel / ch.kuon.phoenix / Socket / Message / toString

toString

diff --git a/docs/ch.kuon.phoenix/-socket/-message/topic.html b/docs/ch.kuon.phoenix/-socket/-message/topic.html index 93aaa79..88f6b7c 100644 --- a/docs/ch.kuon.phoenix/-socket/-message/topic.html +++ b/docs/ch.kuon.phoenix/-socket/-message/topic.html @@ -1,14 +1,18 @@ -Socket.Message.topic - java-phoenix-channel +Socket.Message.topic - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / Message / topic
+phoenix-channel / ch.kuon.phoenix / Socket / Message / topic

topic

var topic: String +

The topic

+

Property

+

+topic - The topic

diff --git a/docs/ch.kuon.phoenix/-socket/-options/-init-.html b/docs/ch.kuon.phoenix/-socket/-options/-init-.html index 42468d9..e5300b3 100644 --- a/docs/ch.kuon.phoenix/-socket/-options/-init-.html +++ b/docs/ch.kuon.phoenix/-socket/-options/-init-.html @@ -1,14 +1,19 @@ -Socket.Options.<init> - java-phoenix-channel +Socket.Options.<init> - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / Options / <init>
+phoenix-channel / ch.kuon.phoenix / Socket / Options / <init>

<init>

Options() +

Socket options.

+

Build the object with default constructor Options() and +customize it afterward.

+

For interval function, look at ExTimer.timerCalc.

+

Note: The logger callback might be called on other thread.

diff --git a/docs/ch.kuon.phoenix/-socket/-options/heartbeat-interval-ms.html b/docs/ch.kuon.phoenix/-socket/-options/heartbeat-interval-ms.html index 2140f42..a3ffb67 100644 --- a/docs/ch.kuon.phoenix/-socket/-options/heartbeat-interval-ms.html +++ b/docs/ch.kuon.phoenix/-socket/-options/heartbeat-interval-ms.html @@ -1,14 +1,15 @@ -Socket.Options.heartbeatIntervalMs - java-phoenix-channel +Socket.Options.heartbeatIntervalMs - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / Options / heartbeatIntervalMs
+phoenix-channel / ch.kuon.phoenix / Socket / Options / heartbeatIntervalMs

heartbeatIntervalMs

var heartbeatIntervalMs: Long +

Heartbeat interval in miliseconds

diff --git a/docs/ch.kuon.phoenix/-socket/-options/index.html b/docs/ch.kuon.phoenix/-socket/-options/index.html index c5c8018..c4a51d7 100644 --- a/docs/ch.kuon.phoenix/-socket/-options/index.html +++ b/docs/ch.kuon.phoenix/-socket/-options/index.html @@ -1,14 +1,19 @@ -Socket.Options - java-phoenix-channel +Socket.Options - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / Options
+phoenix-channel / ch.kuon.phoenix / Socket / Options

Options

class Options +

Socket options.

+

Build the object with default constructor Options() and +customize it afterward.

+

For interval function, look at ExTimer.timerCalc.

+

Note: The logger callback might be called on other thread.

Constructors

+

A raw socket message.

Message(joinRef: Int? = null, ref: Int? = null, topic: String, event: String, payload: JSONObject = JSONObject())
+

The event name

var event: String
+

A join_ref

var joinRef: Int?
+

A payload object

var payload: JSONObject
+

The ref

var ref: Int?
+

The topic

var topic: String
@@ -17,6 +22,7 @@

Constructors

<init>

@@ -29,6 +35,7 @@

Properties

heartbeatIntervalMs

@@ -36,6 +43,7 @@

heartbeatIntervalMs

logger

@@ -43,6 +51,7 @@

logger

params

@@ -50,6 +59,7 @@

params

reconnectAfterMs

@@ -57,6 +67,7 @@

reconnectAfterMs

rejoinAfterMs

@@ -64,6 +75,7 @@

rejoinAfterMs

timeout

diff --git a/docs/ch.kuon.phoenix/-socket/-options/logger.html b/docs/ch.kuon.phoenix/-socket/-options/logger.html index abc13ed..a96bfb8 100644 --- a/docs/ch.kuon.phoenix/-socket/-options/logger.html +++ b/docs/ch.kuon.phoenix/-socket/-options/logger.html @@ -1,14 +1,16 @@ -Socket.Options.logger - java-phoenix-channel +Socket.Options.logger - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / Options / logger
+phoenix-channel / ch.kuon.phoenix / Socket / Options / logger

logger

var logger: ((String, String) -> Unit)? +

Logger function (must be thread safe)

+

Set to null to disable logging.

diff --git a/docs/ch.kuon.phoenix/-socket/-options/params.html b/docs/ch.kuon.phoenix/-socket/-options/params.html index 4dfb9b2..8eb6560 100644 --- a/docs/ch.kuon.phoenix/-socket/-options/params.html +++ b/docs/ch.kuon.phoenix/-socket/-options/params.html @@ -1,14 +1,20 @@ -Socket.Options.params - java-phoenix-channel +Socket.Options.params - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / Options / params
+phoenix-channel / ch.kuon.phoenix / Socket / Options / params

params

var params: HashMap<String, Any>? +

A list of key/value sent with the conection.

+

Those params are serialized to url parameters and appended to the +connection url.

+

For example passing mapOf("foo" to "bar") will happend &foo=bar +to the URL.

+

toString() is automaticall called on the values.

diff --git a/docs/ch.kuon.phoenix/-socket/-options/reconnect-after-ms.html b/docs/ch.kuon.phoenix/-socket/-options/reconnect-after-ms.html index aa26dd5..f514dac 100644 --- a/docs/ch.kuon.phoenix/-socket/-options/reconnect-after-ms.html +++ b/docs/ch.kuon.phoenix/-socket/-options/reconnect-after-ms.html @@ -1,14 +1,15 @@ -Socket.Options.reconnectAfterMs - java-phoenix-channel +Socket.Options.reconnectAfterMs - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / Options / reconnectAfterMs
+phoenix-channel / ch.kuon.phoenix / Socket / Options / reconnectAfterMs

reconnectAfterMs

var reconnectAfterMs: (Int) -> Int +

Reconnect interval functions (must be thread safe)

diff --git a/docs/ch.kuon.phoenix/-socket/-options/rejoin-after-ms.html b/docs/ch.kuon.phoenix/-socket/-options/rejoin-after-ms.html index 885984f..b5f41fb 100644 --- a/docs/ch.kuon.phoenix/-socket/-options/rejoin-after-ms.html +++ b/docs/ch.kuon.phoenix/-socket/-options/rejoin-after-ms.html @@ -1,14 +1,15 @@ -Socket.Options.rejoinAfterMs - java-phoenix-channel +Socket.Options.rejoinAfterMs - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / Options / rejoinAfterMs
+phoenix-channel / ch.kuon.phoenix / Socket / Options / rejoinAfterMs

rejoinAfterMs

var rejoinAfterMs: (Int) -> Int +

Rejoin interval functions (must be thread safe)

diff --git a/docs/ch.kuon.phoenix/-socket/-options/timeout.html b/docs/ch.kuon.phoenix/-socket/-options/timeout.html index 4371e55..2e9c683 100644 --- a/docs/ch.kuon.phoenix/-socket/-options/timeout.html +++ b/docs/ch.kuon.phoenix/-socket/-options/timeout.html @@ -1,14 +1,15 @@ -Socket.Options.timeout - java-phoenix-channel +Socket.Options.timeout - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / Options / timeout
+phoenix-channel / ch.kuon.phoenix / Socket / Options / timeout

timeout

var timeout: Int +

Timeout in miliseconds

diff --git a/docs/ch.kuon.phoenix/-socket/-state/-c-l-o-s-e-d.html b/docs/ch.kuon.phoenix/-socket/-state/-c-l-o-s-e-d.html index 29a3bca..65cd444 100644 --- a/docs/ch.kuon.phoenix/-socket/-state/-c-l-o-s-e-d.html +++ b/docs/ch.kuon.phoenix/-socket/-state/-c-l-o-s-e-d.html @@ -1,11 +1,11 @@ -Socket.State.CLOSED - java-phoenix-channel +Socket.State.CLOSED - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / State / CLOSED
+phoenix-channel / ch.kuon.phoenix / Socket / State / CLOSED

CLOSED

diff --git a/docs/ch.kuon.phoenix/-socket/-state/-c-l-o-s-i-n-g.html b/docs/ch.kuon.phoenix/-socket/-state/-c-l-o-s-i-n-g.html index 142fd22..7a72b94 100644 --- a/docs/ch.kuon.phoenix/-socket/-state/-c-l-o-s-i-n-g.html +++ b/docs/ch.kuon.phoenix/-socket/-state/-c-l-o-s-i-n-g.html @@ -1,11 +1,11 @@ -Socket.State.CLOSING - java-phoenix-channel +Socket.State.CLOSING - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / State / CLOSING
+phoenix-channel / ch.kuon.phoenix / Socket / State / CLOSING

CLOSING

diff --git a/docs/ch.kuon.phoenix/-socket/-state/-c-o-n-n-e-c-t-i-n-g.html b/docs/ch.kuon.phoenix/-socket/-state/-c-o-n-n-e-c-t-i-n-g.html index 11f0445..c07d16d 100644 --- a/docs/ch.kuon.phoenix/-socket/-state/-c-o-n-n-e-c-t-i-n-g.html +++ b/docs/ch.kuon.phoenix/-socket/-state/-c-o-n-n-e-c-t-i-n-g.html @@ -1,11 +1,11 @@ -Socket.State.CONNECTING - java-phoenix-channel +Socket.State.CONNECTING - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / State / CONNECTING
+phoenix-channel / ch.kuon.phoenix / Socket / State / CONNECTING

CONNECTING

diff --git a/docs/ch.kuon.phoenix/-socket/-state/-c-r-e-a-t-e-d.html b/docs/ch.kuon.phoenix/-socket/-state/-c-r-e-a-t-e-d.html index 416d3a9..22cb80a 100644 --- a/docs/ch.kuon.phoenix/-socket/-state/-c-r-e-a-t-e-d.html +++ b/docs/ch.kuon.phoenix/-socket/-state/-c-r-e-a-t-e-d.html @@ -1,11 +1,11 @@ -Socket.State.CREATED - java-phoenix-channel +Socket.State.CREATED - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / State / CREATED
+phoenix-channel / ch.kuon.phoenix / Socket / State / CREATED

CREATED

diff --git a/docs/ch.kuon.phoenix/-socket/-state/-o-p-e-n.html b/docs/ch.kuon.phoenix/-socket/-state/-o-p-e-n.html index bd5b8ad..37e135c 100644 --- a/docs/ch.kuon.phoenix/-socket/-state/-o-p-e-n.html +++ b/docs/ch.kuon.phoenix/-socket/-state/-o-p-e-n.html @@ -1,11 +1,11 @@ -Socket.State.OPEN - java-phoenix-channel +Socket.State.OPEN - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / State / OPEN
+phoenix-channel / ch.kuon.phoenix / Socket / State / OPEN

OPEN

diff --git a/docs/ch.kuon.phoenix/-socket/-state/-u-n-k-n-o-w-n.html b/docs/ch.kuon.phoenix/-socket/-state/-u-n-k-n-o-w-n.html index ebb8148..81ed636 100644 --- a/docs/ch.kuon.phoenix/-socket/-state/-u-n-k-n-o-w-n.html +++ b/docs/ch.kuon.phoenix/-socket/-state/-u-n-k-n-o-w-n.html @@ -1,11 +1,11 @@ -Socket.State.UNKNOWN - java-phoenix-channel +Socket.State.UNKNOWN - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / State / UNKNOWN
+phoenix-channel / ch.kuon.phoenix / Socket / State / UNKNOWN

UNKNOWN

diff --git a/docs/ch.kuon.phoenix/-socket/-state/index.html b/docs/ch.kuon.phoenix/-socket/-state/index.html index 949d4d7..eeae1d5 100644 --- a/docs/ch.kuon.phoenix/-socket/-state/index.html +++ b/docs/ch.kuon.phoenix/-socket/-state/index.html @@ -1,14 +1,15 @@ -Socket.State - java-phoenix-channel +Socket.State - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / State
+phoenix-channel / ch.kuon.phoenix / Socket / State

State

enum class State +

Enum representing socket state

Enum Values

+

Socket options.

Options()
+

Heartbeat interval in miliseconds

var heartbeatIntervalMs: Long
+

Logger function (must be thread safe)

var logger: ((String, String) -> Unit)?
+

A list of key/value sent with the conection.

var params: HashMap<String, Any>?
+

Reconnect interval functions (must be thread safe)

var reconnectAfterMs: (Int) -> Int
+

Rejoin interval functions (must be thread safe)

var rejoinAfterMs: (Int) -> Int
+

Timeout in miliseconds

var timeout: Int
diff --git a/docs/ch.kuon.phoenix/-socket/-state/state.html b/docs/ch.kuon.phoenix/-socket/-state/state.html index 77686aa..11d3598 100644 --- a/docs/ch.kuon.phoenix/-socket/-state/state.html +++ b/docs/ch.kuon.phoenix/-socket/-state/state.html @@ -1,11 +1,11 @@ -Socket.State.state - java-phoenix-channel +Socket.State.state - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / State / state
+phoenix-channel / ch.kuon.phoenix / Socket / State / state

state

diff --git a/docs/ch.kuon.phoenix/-socket/channel.html b/docs/ch.kuon.phoenix/-socket/channel.html index 64ad294..5bafedd 100644 --- a/docs/ch.kuon.phoenix/-socket/channel.html +++ b/docs/ch.kuon.phoenix/-socket/channel.html @@ -1,14 +1,23 @@ -Socket.channel - java-phoenix-channel +Socket.channel - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / channel
+phoenix-channel / ch.kuon.phoenix / Socket / channel

channel

fun channel(topic: String, params: JSONObject = JSONObject()): Channel +

Prefered constructor for channels.

+

Creates a channel and register it with the Socket.

+

Parameters

+

+topic - The channel topic

+

+params - Params sent to the server on join

+

Return
+The created channel

diff --git a/docs/ch.kuon.phoenix/-socket/connect.html b/docs/ch.kuon.phoenix/-socket/connect.html index f9c5324..a397ff2 100644 --- a/docs/ch.kuon.phoenix/-socket/connect.html +++ b/docs/ch.kuon.phoenix/-socket/connect.html @@ -1,14 +1,15 @@ -Socket.connect - java-phoenix-channel +Socket.connect - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / connect
+phoenix-channel / ch.kuon.phoenix / Socket / connect

connect

fun connect(): Unit +

Connect the socket to the server

diff --git a/docs/ch.kuon.phoenix/-socket/connection-state.html b/docs/ch.kuon.phoenix/-socket/connection-state.html index a4722f4..5a42f8a 100644 --- a/docs/ch.kuon.phoenix/-socket/connection-state.html +++ b/docs/ch.kuon.phoenix/-socket/connection-state.html @@ -1,14 +1,17 @@ -Socket.connectionState - java-phoenix-channel +Socket.connectionState - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / connectionState
+phoenix-channel / ch.kuon.phoenix / Socket / connectionState

connectionState

fun connectionState(): State +

Returns the current socket state

+

Return
+The current state

diff --git a/docs/ch.kuon.phoenix/-socket/disconnect.html b/docs/ch.kuon.phoenix/-socket/disconnect.html index 107bcdd..03e69e7 100644 --- a/docs/ch.kuon.phoenix/-socket/disconnect.html +++ b/docs/ch.kuon.phoenix/-socket/disconnect.html @@ -1,14 +1,24 @@ -Socket.disconnect - java-phoenix-channel +Socket.disconnect - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / disconnect
+phoenix-channel / ch.kuon.phoenix / Socket / disconnect

disconnect

fun disconnect(callback: (() -> Unit)? = null, code: Int? = null, reason: String? = null): Unit +

Disconnect the socket.

+

Note: The callback might be called on another thread

+

Parameters

+

+callback - Optional callback called after the socket is +disconnected.

+

+code - Send a disconnect code to the server

+

+reason - Send a disconnect reason to the server

diff --git a/docs/ch.kuon.phoenix/-socket/end-point-u-r-l.html b/docs/ch.kuon.phoenix/-socket/end-point-u-r-l.html index aa63e83..34d2eb6 100644 --- a/docs/ch.kuon.phoenix/-socket/end-point-u-r-l.html +++ b/docs/ch.kuon.phoenix/-socket/end-point-u-r-l.html @@ -1,11 +1,11 @@ -Socket.endPointURL - java-phoenix-channel +Socket.endPointURL - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / endPointURL
+phoenix-channel / ch.kuon.phoenix / Socket / endPointURL

endPointURL

diff --git a/docs/ch.kuon.phoenix/-socket/index.html b/docs/ch.kuon.phoenix/-socket/index.html index 7484aa7..f714f13 100644 --- a/docs/ch.kuon.phoenix/-socket/index.html +++ b/docs/ch.kuon.phoenix/-socket/index.html @@ -1,14 +1,21 @@ -Socket - java-phoenix-channel +Socket - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket
+phoenix-channel / ch.kuon.phoenix / Socket

Socket

class Socket : WebSocketAdapter +

Socket main constructor.

+

This class is a thin layer above websockets. This layer provides +compatibility with Phoenix Sockets. It handle heartbeat, serialization and +provides a simple event based API.

+

When using Phoenix, you will usually not push messages directly to sockets +but use Channels instead.

+

The url can use either the ws:// or wss:// scheme.

Types

@@ -17,6 +24,7 @@

Types

Message

@@ -24,6 +32,7 @@

Message

Options

@@ -31,6 +40,7 @@

Options

State

@@ -43,6 +53,7 @@

Constructors

<init>

@@ -55,6 +66,8 @@

Properties

opts

@@ -62,6 +75,7 @@

opts

url

@@ -74,6 +88,7 @@

Functions

channel

@@ -81,6 +96,7 @@

channel

connect

@@ -88,6 +104,7 @@

connect

connectionState

@@ -95,6 +112,7 @@

connectionState

disconnect

@@ -110,6 +128,7 @@

endPointURL

isConnected

@@ -117,9 +136,7 @@

isConnected

log

@@ -127,13 +144,18 @@

log

off

+

Unregister on listeners

+fun off(refs: List<Ref>): Unit +

Unregister on listener

+fun off(ref: Ref): Unit @@ -141,6 +163,8 @@

onClose

onError

@@ -148,6 +172,8 @@

onError

onMessage

@@ -155,6 +181,8 @@

onMessage

onOpen

@@ -162,6 +190,7 @@

onOpen

push

diff --git a/docs/ch.kuon.phoenix/-socket/is-connected.html b/docs/ch.kuon.phoenix/-socket/is-connected.html index 7f0b44b..d28f38b 100644 --- a/docs/ch.kuon.phoenix/-socket/is-connected.html +++ b/docs/ch.kuon.phoenix/-socket/is-connected.html @@ -1,14 +1,18 @@ -Socket.isConnected - java-phoenix-channel +Socket.isConnected - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / isConnected
+phoenix-channel / ch.kuon.phoenix / Socket / isConnected

isConnected

fun isConnected(): Boolean +

Returns the connected state (if state is OPEN)

+

Return
+True if state +is OPEN, false otherwise

diff --git a/docs/ch.kuon.phoenix/-socket/log.html b/docs/ch.kuon.phoenix/-socket/log.html index df3f982..f4c6cb7 100644 --- a/docs/ch.kuon.phoenix/-socket/log.html +++ b/docs/ch.kuon.phoenix/-socket/log.html @@ -1,18 +1,18 @@ -Socket.log - java-phoenix-channel +Socket.log - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / log
+phoenix-channel / ch.kuon.phoenix / Socket / log

log

fun log(tag: String, msg: String, data: Any? = null): Unit -

Log a message. -Override logger in socket option to change this. -Default to stdout.

+

Log a message.

+

Override logger in Socket.Option to change this.

+

Default to stdout.

Parameters

tag - Message tag

@@ -20,6 +20,6 @@

Parameters

msg - Message

data - An object that will be appended to the message, - toString() will be called on data.

+toString() will be called on data.

diff --git a/docs/ch.kuon.phoenix/-socket/off.html b/docs/ch.kuon.phoenix/-socket/off.html index 21fbaa6..15186e8 100644 --- a/docs/ch.kuon.phoenix/-socket/off.html +++ b/docs/ch.kuon.phoenix/-socket/off.html @@ -1,14 +1,24 @@ -Socket.off - java-phoenix-channel +Socket.off - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / off
+phoenix-channel / ch.kuon.phoenix / Socket / off

off

-fun off(refs: List<Int>): Unit +fun off(refs: List<Ref>): Unit +

Unregister on listeners

+

Parameters

+

+refs - A list of references

+ +fun off(ref: Ref): Unit +

Unregister on listener

+

Parameters

+

+refs - A single reference

diff --git a/docs/ch.kuon.phoenix/-socket/on-close.html b/docs/ch.kuon.phoenix/-socket/on-close.html index fbf249f..365cc6a 100644 --- a/docs/ch.kuon.phoenix/-socket/on-close.html +++ b/docs/ch.kuon.phoenix/-socket/on-close.html @@ -1,14 +1,23 @@ -Socket.onClose - java-phoenix-channel +Socket.onClose - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / onClose
+phoenix-channel / ch.kuon.phoenix / Socket / onClose

onClose

fun onClose(callback: CloseCallback): Ref +

Register an close callback. +Multiple callbacks can be registerd.

+

Note: The callback might be called on another thread

+

Parameters

+

+callback - A callback function

+

Return
+A reference to the callback that can be used with the +Socket.off function.

diff --git a/docs/ch.kuon.phoenix/-socket/on-error.html b/docs/ch.kuon.phoenix/-socket/on-error.html index 1665f3a..8ddcbf7 100644 --- a/docs/ch.kuon.phoenix/-socket/on-error.html +++ b/docs/ch.kuon.phoenix/-socket/on-error.html @@ -1,14 +1,23 @@ -Socket.onError - java-phoenix-channel +Socket.onError - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / onError
+phoenix-channel / ch.kuon.phoenix / Socket / onError

onError

fun onError(callback: ErrorCallback): Ref +

Register an error callback. +Multiple callbacks can be registerd.

+

Note: The callback might be called on another thread

+

Parameters

+

+callback - A callback function

+

Return
+A reference to the callback that can be used with the +Socket.off function.

diff --git a/docs/ch.kuon.phoenix/-socket/on-message.html b/docs/ch.kuon.phoenix/-socket/on-message.html index fd4f24a..544696c 100644 --- a/docs/ch.kuon.phoenix/-socket/on-message.html +++ b/docs/ch.kuon.phoenix/-socket/on-message.html @@ -1,14 +1,23 @@ -Socket.onMessage - java-phoenix-channel +Socket.onMessage - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / onMessage
+phoenix-channel / ch.kuon.phoenix / Socket / onMessage

onMessage

fun onMessage(callback: MessageCallback): Ref +

Register an on message callback. +Multiple callbacks can be registerd.

+

Note: The callback might be called on another thread

+

Parameters

+

+callback - A callback function

+

Return
+A reference to the callback that can be used with the +Socket.off function.

diff --git a/docs/ch.kuon.phoenix/-socket/on-open.html b/docs/ch.kuon.phoenix/-socket/on-open.html index 91c5a15..8e26146 100644 --- a/docs/ch.kuon.phoenix/-socket/on-open.html +++ b/docs/ch.kuon.phoenix/-socket/on-open.html @@ -1,14 +1,23 @@ -Socket.onOpen - java-phoenix-channel +Socket.onOpen - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / onOpen
+phoenix-channel / ch.kuon.phoenix / Socket / onOpen

onOpen

fun onOpen(callback: OpenCallback): Ref +

Register an open callback. +Multiple callbacks can be registerd.

+

Note: The callback might be called on another thread

+

Parameters

+

+callback - A callback function

+

Return
+A reference to the callback that can be used with the +Socket.off function.

diff --git a/docs/ch.kuon.phoenix/-socket/opts.html b/docs/ch.kuon.phoenix/-socket/opts.html index 71c4b23..944e70f 100644 --- a/docs/ch.kuon.phoenix/-socket/opts.html +++ b/docs/ch.kuon.phoenix/-socket/opts.html @@ -1,14 +1,20 @@ -Socket.opts - java-phoenix-channel +Socket.opts - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / opts
+phoenix-channel / ch.kuon.phoenix / Socket / opts

opts

var opts: Options +

An Socket.Option object. If ommited default configuration is +used.

+

Property

+

+opts - An Socket.Option object. If ommited default configuration is +used.

diff --git a/docs/ch.kuon.phoenix/-socket/push.html b/docs/ch.kuon.phoenix/-socket/push.html index 013b1a5..4b74d0e 100644 --- a/docs/ch.kuon.phoenix/-socket/push.html +++ b/docs/ch.kuon.phoenix/-socket/push.html @@ -1,14 +1,18 @@ -Socket.push - java-phoenix-channel +Socket.push - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / push
+phoenix-channel / ch.kuon.phoenix / Socket / push

push

fun push(msg: Message): Unit +

Push a message to the socket

+

Parameters

+

+msg - A message

diff --git a/docs/ch.kuon.phoenix/-socket/to-string.html b/docs/ch.kuon.phoenix/-socket/to-string.html index 51105c2..1896e00 100644 --- a/docs/ch.kuon.phoenix/-socket/to-string.html +++ b/docs/ch.kuon.phoenix/-socket/to-string.html @@ -1,11 +1,11 @@ -Socket.toString - java-phoenix-channel +Socket.toString - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / toString
+phoenix-channel / ch.kuon.phoenix / Socket / toString

toString

diff --git a/docs/ch.kuon.phoenix/-socket/url.html b/docs/ch.kuon.phoenix/-socket/url.html index 0ea4d67..fa67314 100644 --- a/docs/ch.kuon.phoenix/-socket/url.html +++ b/docs/ch.kuon.phoenix/-socket/url.html @@ -1,14 +1,18 @@ -Socket.url - java-phoenix-channel +Socket.url - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix / Socket / url
+phoenix-channel / ch.kuon.phoenix / Socket / url

url

var url: String +

The full web socket URL

+

Property

+

+url - The full web socket URL

diff --git a/docs/ch.kuon.phoenix/index.html b/docs/ch.kuon.phoenix/index.html index 804f849..fdde17a 100644 --- a/docs/ch.kuon.phoenix/index.html +++ b/docs/ch.kuon.phoenix/index.html @@ -1,11 +1,11 @@ -ch.kuon.phoenix - java-phoenix-channel +ch.kuon.phoenix - phoenix-channel -java-phoenix-channel / ch.kuon.phoenix
+phoenix-channel / ch.kuon.phoenix

Package ch.kuon.phoenix

Types

@@ -16,6 +16,7 @@

Types

Channel

@@ -28,9 +29,17 @@

ExTimer

+ + + + @@ -38,9 +47,22 @@

Presence

Socket

+

A raw socket message.

class Message
+

Socket options.

class Options
+

Enum representing socket state

enum class State
+

Socket main constructor.

Socket(url: String, opts: Options = Socket.Options())
+

An Socket.Option object. If ommited default configuration is +used.

var opts: Options
+

The full web socket URL

var url: String
+

Prefered constructor for channels.

fun channel(topic: String, params: JSONObject = JSONObject()): Channel
+

Connect the socket to the server

fun connect(): Unit
+

Returns the current socket state

fun connectionState(): State
+

Disconnect the socket.

fun disconnect(callback: (() -> Unit)? = null, code: Int? = null, reason: String? = null): Unit
+

Returns the connected state (if state is OPEN)

fun isConnected(): Boolean
-

Log a message. -Override logger in socket option to change this. -Default to stdout.

+

Log a message.

fun log(tag: String, msg: String, data: Any? = null): Unit
-fun off(refs: List<Int>): Unit

onClose

+

Register an close callback. +Multiple callbacks can be registerd.

fun onClose(callback: CloseCallback): Ref
+

Register an error callback. +Multiple callbacks can be registerd.

fun onError(callback: ErrorCallback): Ref
+

Register an on message callback. +Multiple callbacks can be registerd.

fun onMessage(callback: MessageCallback): Ref
+

Register an open callback. +Multiple callbacks can be registerd.

fun onOpen(callback: OpenCallback): Ref
+

Push a message to the socket

fun push(msg: Message): Unit
+

Phoenix channel client

class Channel
+

LibraryTest

+
+class LibraryTest

Presence

+

Listen for presence changes

class Presence
+

Socket main constructor.

class Socket : WebSocketAdapter
+

Properties

+ + + + + + + +
+

url

+
+val url: String
diff --git a/docs/ch.kuon.phoenix/url.html b/docs/ch.kuon.phoenix/url.html new file mode 100644 index 0000000..c474c92 --- /dev/null +++ b/docs/ch.kuon.phoenix/url.html @@ -0,0 +1,14 @@ + + + +url - phoenix-channel + + + +phoenix-channel / ch.kuon.phoenix / url
+
+

url

+ +val url: String + + diff --git a/docs/index-outline.html b/docs/index-outline.html index e457201..82a8513 100644 --- a/docs/index-outline.html +++ b/docs/index-outline.html @@ -5,7 +5,7 @@ -java-phoenix-channel
+phoenix-channel
-package ch.kuon.phoenix
+package ch.kuon.phoenix
-class Socket : WebSocketAdapter
+class Socket : WebSocketAdapter
+val url: String
diff --git a/docs/index.html b/docs/index.html index 8fd863d..0616141 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,11 +1,11 @@ -java-phoenix-channel +phoenix-channel -java-phoenix-channel
+phoenix-channel

Packages