Class VertxMockWebSocket

    • Constructor Detail

      • VertxMockWebSocket

        public VertxMockWebSocket​(RecordedRequest request,
                                  io.vertx.core.http.ServerWebSocket webSocket)
    • Method Detail

      • send

        public boolean send​(String text)
        Description copied from interface: WebSocket
        Attempts to enqueue text to be UTF-8 encoded and sent as the data of a text (type 0x1) message.
        Specified by:
        send in interface WebSocket
      • send

        public boolean send​(byte[] bytes)
        Description copied from interface: WebSocket
        Attempts to enqueue bytes to be sent as a the data of a binary (type 0x2) message.
        Specified by:
        send in interface WebSocket
      • close

        public boolean close​(int code,
                             String reason)
        Description copied from interface: WebSocket
        Attempts to initiate a graceful shutdown of this web socket.

        No more messages can be sent.

        Specified by:
        close in interface WebSocket
        Parameters:
        code - the status code.
        reason - reason of closure.