Class FFXClient

java.lang.Object
ffx.ui.commands.FFXClient

public class FFXClient extends Object
The FFXClient class encapsulates a socket connection to an FFXServer started by an executing FFX instance. FFXSystem and FFXUpdate objects are sent by the FFXServer to the FFXClient on request.
Author:
Michael J. Schnieders
  • Constructor Details

    • FFXClient

      public FFXClient()
      Constructor for FFXClient.
    • FFXClient

      public FFXClient(InetSocketAddress a)
      Constructor for FFXClient.
      Parameters:
      a - a InetSocketAddress object.
    • FFXClient

      public FFXClient(int port)
      Constructor for FFXClient.
      Parameters:
      port - a int.
  • Method Details

    • connect

      public void connect()
      Attempts to connect to a Tinker FServer. If this FClient is already connected, the connection will be closed.
    • getSystem

      public SimulationDefinition getSystem()
      Getter for the field system.
      Returns:
      a SimulationDefinition object.
    • getUpdate

      public SimulationUpdate getUpdate()
      Getter for the field update.
      Returns:
      a SimulationUpdate object.
    • isClosed

      public boolean isClosed()
      isClosed
      Returns:
      a boolean.
    • isConnected

      public boolean isConnected()
      isConnected
      Returns:
      a boolean.
    • readSocket

      public void readSocket()
      readSocket
    • release

      public void release()
      release