Package edu.uky.cs.nil.tt.io


package edu.uky.cs.nil.tt.io
The IO (input/output) package defines the various message types that can be sent between a server and client and provide some utilities for serializing and deserializing objects as JSON.
  • Classes
    Class
    Description
    An abstract adapter is used to configure a GsonBuilder to read and write objects that share a common parent class, including abstract types like interfaces and abstract classes.
    The choice message is sent from an agent to the {edu.uky.cs.nil.tt.Server server} to signal what turn the agent wants to take.
    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.
    Advertises that a specific story world and agent pair is waiting for a match.
    The end message is sent from the {edu.uky.cs.nil.tt.Server server} to an agent to indicate that the session had ended and that they should now disconnect.
    The error message is sent from the {edu.uky.cs.nil.tt.Server server} to an agent if one of the agent's messages causes a problem or is incorrectly formatted.
    A generic adapter is used to configure a GsonBuilder to write all subclasses of a given superclass as that superclass.
    The join message is the first message sent from an agent to the {edu.uky.cs.nil.tt.Server server} to provide the agent's credentials and its preferences for what story world, role, and partner they want for their session.
    A message is information sent to or from a server in JSON format.
    The report message is sent from an agent to the {edu.uky.cs.nil.tt.Server server} to indicate the value of a question on a survey about the session they are playing.
    The start message is sent from the {edu.uky.cs.nil.tt.Server server} to an agent when a partner has been found and their session begins.
    The stop message can be sent from either the {edu.uky.cs.nil.tt.Server server} or the agent to indicate that no more turns will happen in the session (though reports may still happen) and that the session should end soon.
    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.