Package application

Class WebSocketConnection

java.lang.Object
io.vertx.core.AbstractVerticle
application.WebSocketConnection
All Implemented Interfaces:
io.vertx.core.Verticle

public class WebSocketConnection extends io.vertx.core.AbstractVerticle
This class is in charge of connecting to the server and handling the GUI update when it receives messages from the server. When start is called it connects the websocket to the server and initializes the message handler. The handler updates the GUI when order data arrives, if the server is not able to provide the data the websocket sends the request again. If the connection is successful it asks all the orders from the server. If the connection is not successful it keeps trying to reconnect.
  • Field Summary

    Fields inherited from class io.vertx.core.AbstractVerticle

    context, vertx
  • Constructor Summary

    Constructors
    Constructor
    Description
    Class Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     

    Methods inherited from class io.vertx.core.AbstractVerticle

    config, deploymentID, getVertx, init, processArgs, start, stop, stop

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WebSocketConnection

      public WebSocketConnection(View view)
      Class Constructor
      Parameters:
      view - the application.Main GUI
  • Method Details

    • start

      public void start()
      Overrides:
      start in class io.vertx.core.AbstractVerticle