Class ServerOutput

java.lang.Object
za.co.wethinkcode.robots.server.networking.ServerOutput

public class ServerOutput extends Object
The Server Output Class is solely responsible for the networking component of the server output
  • Constructor Summary

    Constructors
    Constructor
    Description
    Standard Constructor for the server Output Object
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    send(com.google.gson.JsonObject json)
    The send message is the final state of validation that the message being sent over the network adheres to the Robot World API spec
    void
    send(String message)
    A raw string being sent over the network.

    Methods inherited from class java.lang.Object

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

    • ServerOutput

      public ServerOutput(Socket socket) throws IOException
      Standard Constructor for the server Output Object
      Parameters:
      socket - the socket this server output is being connected to
      Throws:
      IOException - fails to be constructed if there is a flaw in the socket design
  • Method Details

    • send

      public void send(com.google.gson.JsonObject json)
      The send message is the final state of validation that the message being sent over the network adheres to the Robot World API spec
      Parameters:
      json - the json Object being sent over the network
    • send

      public void send(String message)
      A raw string being sent over the network. Mostly used for utility purposes