Package io.joshworks.stream.client.ws
Class WsConnection
- java.lang.Object
-
- io.joshworks.stream.client.StreamConnection
-
- io.joshworks.stream.client.ws.WsConnection
-
public class WsConnection extends StreamConnection
Created by Josh Gontijo on 6/8/17.
-
-
Field Summary
-
Fields inherited from class io.joshworks.stream.client.StreamConnection
monitor, shuttingDown, url, uuid, worker
-
-
Method Summary
Modifier and Type Method Description io.undertow.websockets.core.WebSocketChannelchannel()voidclose()voidclose(io.undertow.websockets.core.CloseMessage closeMessage)protected voidcloseChannel()booleanisOpen()java.util.concurrent.CompletableFuture<WsConnection>sendBinary(byte[] bytes)java.util.concurrent.CompletableFuture<WsConnection>sendBinary(java.nio.ByteBuffer byteBuffer)java.util.concurrent.CompletableFuture<WsConnection>sendPing(byte[] bytes)java.util.concurrent.CompletableFuture<WsConnection>sendPing(java.nio.ByteBuffer byteBuffer)java.util.concurrent.CompletableFuture<WsConnection>sendPong(byte[] bytes)java.util.concurrent.CompletableFuture<WsConnection>sendPong(java.nio.ByteBuffer byteBuffer)java.util.concurrent.CompletableFuture<WsConnection>sendText(java.lang.String message)protected voidtryConnect()-
Methods inherited from class io.joshworks.stream.client.StreamConnection
closeChannel, connect, reconnect, reconnect
-
-
-
-
Method Detail
-
tryConnect
protected void tryConnect() throws java.lang.Exception- Specified by:
tryConnectin classStreamConnection- Throws:
java.lang.Exception
-
isOpen
public boolean isOpen()
-
close
public void close()
-
close
public void close(io.undertow.websockets.core.CloseMessage closeMessage)
-
closeChannel
protected void closeChannel()
- Specified by:
closeChannelin classStreamConnection
-
channel
public io.undertow.websockets.core.WebSocketChannel channel()
-
sendText
public java.util.concurrent.CompletableFuture<WsConnection> sendText(java.lang.String message)
-
sendBinary
public java.util.concurrent.CompletableFuture<WsConnection> sendBinary(byte[] bytes)
-
sendBinary
public java.util.concurrent.CompletableFuture<WsConnection> sendBinary(java.nio.ByteBuffer byteBuffer)
-
sendPing
public java.util.concurrent.CompletableFuture<WsConnection> sendPing(byte[] bytes)
-
sendPing
public java.util.concurrent.CompletableFuture<WsConnection> sendPing(java.nio.ByteBuffer byteBuffer)
-
sendPong
public java.util.concurrent.CompletableFuture<WsConnection> sendPong(byte[] bytes)
-
sendPong
public java.util.concurrent.CompletableFuture<WsConnection> sendPong(java.nio.ByteBuffer byteBuffer)
-
-