Class Connect

java.lang.Object
edu.uky.cs.nil.tt.io.Message
edu.uky.cs.nil.tt.io.Connect

public class Connect extends Message
The connect message is sent from the {edu.uky.cs.nil.tt.Server server} to an agent as soon as the agent connects to give details about which story worlds and agents are available for play.
Author:
Stephen G. Ware
  • Field Details

    • version

      public final String version
      The server's software version
    • worlds

      public final List<Database.Entry> worlds
      A list of entries giving the names and descriptions of the publicly listed worlds available on this server
    • agents

      public final List<Database.Entry> agents
      A list of entries giving the names and descriptions of the publicly listed agents available on this server
    • available

      public final Connect.Available[] available
      A list of available world/agent pairs that lets an agent know whether a specific combination of a story world and agent is immediately available for play
  • Constructor Details

    • Connect

      public Connect(List<Database.Entry> worlds, List<Database.Entry> agents, Connect.Available[] available)
      Constructs a new connect message with a given list of worlds and agents.
      Parameters:
      worlds - a list of the names and descriptions of worlds available on the server
      agents - a list of the names and descriptions of agents available on the server
      available - a list of currently available world/agent pairs
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • verify

      public void verify()
      Description copied from class: Message
      Checks that this message is correctly configured and throws an exception if not. This method should be called soon after the message has been parsed. It should check that all the necessary fields are set and that their values are legal values.
      Specified by:
      verify in class Message