Class MockWebSocket
java.lang.Object
kong.unirest.core.MockWebSocket
- All Implemented Interfaces:
WebSocket
-
Nested Class Summary
Nested classes/interfaces inherited from interface WebSocket
WebSocket.Builder, WebSocket.Listener -
Field Summary
FieldsFields inherited from interface WebSocket
NORMAL_CLOSURE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()voidbooleanbooleanvoidrequest(long n) sendBinary(ByteBuffer data, boolean last) sendPing(ByteBuffer message) sendPong(ByteBuffer message) sendText(CharSequence data, boolean last) private CompletableFuture<WebSocket> sendToOtherSide(BiConsumer<WebSocket, WebSocket.Listener> consumer)
-
Field Details
-
remoteSocketSet
-
-
Constructor Details
-
MockWebSocket
public MockWebSocket()
-
-
Method Details
-
sendToOtherSide
private CompletableFuture<WebSocket> sendToOtherSide(BiConsumer<WebSocket, WebSocket.Listener> consumer) -
sendText
-
sendBinary
- Specified by:
sendBinaryin interfaceWebSocket
-
sendPing
-
sendPong
-
sendClose
-
request
-
getSubprotocol
- Specified by:
getSubprotocolin interfaceWebSocket
-
isOutputClosed
public boolean isOutputClosed()- Specified by:
isOutputClosedin interfaceWebSocket
-
isInputClosed
public boolean isInputClosed()- Specified by:
isInputClosedin interfaceWebSocket
-
abort
-
init
-