Class Update

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

public class Update extends Message
The updates message is sent from the {edu.uky.cs.nil.tt.Server server} to an agent each time a turn is taken and the state of the story world changes. An update is also sent immediately after a session starts to give the story world's initial state.
Author:
Stephen G. Ware
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final Status
    An object describing the history of the story so far, the current state of the story world, and what turns are available for the agent to take, if any
  • Constructor Summary

    Constructors
    Constructor
    Description
    Update(Status status)
    Constructs a new update message with the story world's current status.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    Checks that this message is correctly configured and throws an exception if not.

    Methods inherited from class Message

    configure, getAgent, setAgent

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • status

      public final Status status
      An object describing the history of the story so far, the current state of the story world, and what turns are available for the agent to take, if any
  • Constructor Details

    • Update

      public Update(Status status)
      Constructs a new update message with the story world's current status.
      Parameters:
      status - the history, current state, and available turns in the session's story world
  • 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