-
public final class ClientExtensionsKt
-
-
Method Summary
Modifier and Type Method Description final <T extends ChatEvent> DisposablesubscribeFor(ChatClient $self, Function1<T, Unit> listener)Subscribes to client events of type T. final <T extends ChatEvent> DisposablesubscribeFor(ChatClient $self, LifecycleOwner lifecycleOwner, Function1<T, Unit> listener)Subscribes to client events of type T, in the lifecycle of lifecycleOwner. final DisposablesubscribeFor(ChatClient $self, KClass<out ChatEvent> eventTypes, Function1<ChatEvent, Unit> listener)Subscribes to the specific eventTypes of the client. final DisposablesubscribeFor(ChatClient $self, LifecycleOwner lifecycleOwner, KClass<out ChatEvent> eventTypes, Function1<ChatEvent, Unit> listener)Subscribes to the specific eventTypes of the client, in the lifecycle of lifecycleOwner. final <T extends ChatEvent> DisposablesubscribeForSingle(ChatClient $self, Function1<T, Unit> listener)Subscribes for the next client event of type T. -
-
Method Detail
-
subscribeFor
final <T extends ChatEvent> Disposable subscribeFor(ChatClient $self, Function1<T, Unit> listener)
Subscribes to client events of type T.
-
subscribeFor
final <T extends ChatEvent> Disposable subscribeFor(ChatClient $self, LifecycleOwner lifecycleOwner, Function1<T, Unit> listener)
Subscribes to client events of type T, in the lifecycle of lifecycleOwner.
Only receives events when the lifecycle is in a STARTED state, otherwise events are dropped.
-
subscribeFor
final Disposable subscribeFor(ChatClient $self, KClass<out ChatEvent> eventTypes, Function1<ChatEvent, Unit> listener)
Subscribes to the specific eventTypes of the client.
-
subscribeFor
final Disposable subscribeFor(ChatClient $self, LifecycleOwner lifecycleOwner, KClass<out ChatEvent> eventTypes, Function1<ChatEvent, Unit> listener)
Subscribes to the specific eventTypes of the client, in the lifecycle of lifecycleOwner.
Only receives events when the lifecycle is in a STARTED state, otherwise events are dropped.
-
subscribeForSingle
final <T extends ChatEvent> Disposable subscribeForSingle(ChatClient $self, Function1<T, Unit> listener)
Subscribes for the next client event of type T.
-
-
-
-