Package edu.wisc.game.util

## Class Hosts

- java.lang.Object
- - edu.wisc.game.util.Hosts

-     public class Hosts
      extends Object

  Convenience routines to determine the host name etc

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Hosts()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static boolean` | `atHome()` | Returns true if the application apparently runs on a home PC
    `static String` | `determineHostname()` | Returns the host name this application is running on.
    `static boolean` | `isLocal​(String hostname)` | Returns true if this is a test run on a home PC.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Hosts

          public Hosts()

  - ### Method Detail

    - #### isLocal

          public static boolean isLocal​(String hostname)

      Returns true if this is a test run on a home PC. The list of such machines' host names is hard-coded inside this method. When such a machine is used, we can use the "localhost" URL in emails, since the emails will most likely be read in a web browser on the same machine, possibly even in off-line mode. This contrasts with production runs on a "real" web server, when the true hostname should always be used.

    - #### determineHostname

          public static String determineHostname()

      Returns the host name this application is running on.

    - #### atHome

          public static boolean atHome()

      Returns true if the application apparently runs on a home PC