Class LocationsManager

java.lang.Object
com.iizix.server.geo.LocationsManager

public class LocationsManager extends Object
The manager for locations used for background updated from devices posted using HTTP(S).
Author:
Christopher Mindus
  • Field Details

  • Method Details

    • getInstance

      public static LocationsManager getInstance()
      Gets the instance of the locations manager.
      Returns:
      The instance, null if not initialized yet.
    • isLocationsURL

      public static boolean isLocationsURL(String url)
      Verifies if the URL is a location update URL.
      Returns:
      true if this is a location URL, false otherwise.
    • initializeInstance

      public static ILocationReceiver initializeInstance(ServerShell server)
      Creates the singleton instance.
      Returns:
      The receiver The receiver instance.
      Throws:
      IllegalStateException - If the singleton already is created.
    • addLocation

      public boolean addLocation(AuthenticatedUser user, DeviceLocation location)
      Adds a new location for a user.
      Parameters:
      user - The user information.
      location - The location.
      Returns:
      true if the location was added to a user, false if user was undefined.
      Throws:
      NullPointerException - If one of the parameters are null.