Package io.getstream.core.faye.client
Class FayeClient
- java.lang.Object
-
- okhttp3.WebSocketListener
-
- io.getstream.core.faye.client.FayeClient
-
public class FayeClient extends okhttp3.WebSocketListener
-
-
Constructor Summary
Constructors Constructor Description FayeClient(java.net.URL baseURL)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connect()
java.util.concurrent.CompletableFuture<java.lang.Void>
disconnect()
void
handshake()
void
onClosed(okhttp3.WebSocket webSocket, int code, java.lang.String reason)
void
onFailure(okhttp3.WebSocket webSocket, java.lang.Throwable t, okhttp3.Response response)
void
onMessage(okhttp3.WebSocket webSocket, java.lang.String text)
java.util.concurrent.CompletableFuture<java.lang.Void>
publish(java.lang.String channel, java.util.Map<java.lang.String,java.lang.Object> data)
void
setMessageTransformer(MessageTransformer messageTransformer)
void
setStateChangeListener(StateChangeListener stateChangeListener)
java.util.concurrent.CompletableFuture<ChannelSubscription>
subscribe(java.lang.String channel, ChannelDataCallback callback)
java.util.concurrent.CompletableFuture<ChannelSubscription>
subscribe(java.lang.String channel, ChannelDataCallback callback, SubscriptionCancelledCallback onCancelled)
void
unsubscribe(java.lang.String channel, ChannelSubscription channelSubscription)
-
-
-
Method Detail
-
setMessageTransformer
public void setMessageTransformer(MessageTransformer messageTransformer)
-
setStateChangeListener
public void setStateChangeListener(StateChangeListener stateChangeListener)
-
onMessage
public void onMessage(okhttp3.WebSocket webSocket, java.lang.String text)
- Overrides:
onMessage
in classokhttp3.WebSocketListener
-
onFailure
public void onFailure(okhttp3.WebSocket webSocket, java.lang.Throwable t, okhttp3.Response response)
- Overrides:
onFailure
in classokhttp3.WebSocketListener
-
onClosed
public void onClosed(okhttp3.WebSocket webSocket, int code, java.lang.String reason)
- Overrides:
onClosed
in classokhttp3.WebSocketListener
-
handshake
public void handshake()
-
connect
public void connect()
-
disconnect
public java.util.concurrent.CompletableFuture<java.lang.Void> disconnect()
-
subscribe
public java.util.concurrent.CompletableFuture<ChannelSubscription> subscribe(java.lang.String channel, ChannelDataCallback callback)
-
subscribe
public java.util.concurrent.CompletableFuture<ChannelSubscription> subscribe(java.lang.String channel, ChannelDataCallback callback, SubscriptionCancelledCallback onCancelled)
-
unsubscribe
public void unsubscribe(java.lang.String channel, ChannelSubscription channelSubscription)
-
publish
public java.util.concurrent.CompletableFuture<java.lang.Void> publish(java.lang.String channel, java.util.Map<java.lang.String,java.lang.Object> data)
-
-