Package io.fabric8.mockwebserver.vertx
Class VertxMockWebSocket
- java.lang.Object
-
- io.fabric8.mockwebserver.vertx.VertxMockWebSocket
-
-
Constructor Summary
Constructors Constructor Description VertxMockWebSocket(RecordedRequest request, io.vertx.core.http.ServerWebSocket webSocket)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanclose(int code, String reason)Attempts to initiate a graceful shutdown of this web socket.RecordedRequestrequest()Returns the original request that initiated this web socket.booleansend(byte[] bytes)Attempts to enqueuebytesto be sent as a the data of a binary (type0x2) message.booleansend(String text)Attempts to enqueuetextto be UTF-8 encoded and sent as the data of a text (type0x1) message.
-
-
-
Constructor Detail
-
VertxMockWebSocket
public VertxMockWebSocket(RecordedRequest request, io.vertx.core.http.ServerWebSocket webSocket)
-
-
Method Detail
-
request
public RecordedRequest request()
Description copied from interface:WebSocketReturns the original request that initiated this web socket.
-
send
public boolean send(String text)
Description copied from interface:WebSocketAttempts to enqueuetextto be UTF-8 encoded and sent as the data of a text (type0x1) message.
-
send
public boolean send(byte[] bytes)
Description copied from interface:WebSocketAttempts to enqueuebytesto be sent as a the data of a binary (type0x2) message.
-
-