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
-
Method Summary
Methods inherited from class io.vertx.core.AbstractVerticle
config, deploymentID, getVertx, init, processArgs, start, stop, stop
-
Constructor Details
-
WebSocketConnection
Class Constructor- Parameters:
view
- the application.Main GUI
-
-
Method Details
-
start
public void start()- Overrides:
start
in classio.vertx.core.AbstractVerticle
-