Class HubTester

java.lang.Object
org.astrogrid.samp.test.Tester
org.astrogrid.samp.test.HubTester

public class HubTester extends Tester
Tester for a running hub. Attempts to test as much of the SAMP standard as possible for an existing hub implementation.
Since:
18 Jul 2008
Author:
Mark Taylor
  • Constructor Details

  • Method Details

    • run

      public void run() throws IOException
      Perform a wide variety of tests on a running hub.
      Throws:
      IOException
    • createRandomObject

      public Object createRandomObject(int level, boolean ugly)
      Generates an object with random content for transmission using SAMP. This may be a structure containing strings, lists and maps with any legal values as defined by the SAMP data encoding rules.
      Parameters:
      level - maximum level of nesting (how deeply lists/maps may appear within other lists/maps)
      ugly - if true, any legal SAMP content will be used; if false, the returned object should be reasonably human-readable if printed (toString)
      Returns:
      random SAMP object
    • createRandomString

      public String createRandomString(boolean ugly)
      Creates a new random string for transmission using SAMP. This may have any legal content according to the SAMP data encoding rules.
      Parameters:
      ugly - if true, any legal SAMP content will be used; if false, the returned object should be reasonably human-readable if printed (toString)
    • main

      public static void main(String[] args) throws IOException
      Main method. Tests a hub which is currently running.
      Throws:
      IOException
    • runMain

      public static int runMain(String[] args) throws IOException
      Does the work for the main method. Use -help flag.
      Throws:
      IOException