Package com.iizix.server.geo
Class LocationsManager
java.lang.Object
com.iizix.server.geo.LocationsManager
The manager for locations used for background updated from devices posted using HTTP(S).
- Author:
- Christopher Mindus
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The base URL for location updates: "/locations".Method Summary
Modifier and TypeMethodDescriptionboolean
addLocation
(AuthenticatedUser user, DeviceLocation location) Adds a new location for a user.static LocationsManager
Gets the instance of the locations manager.static ILocationReceiver
initializeInstance
(ServerShell server) Creates the singleton instance.static boolean
isLocationsURL
(String url) Verifies if the URL is a location update URL.
Field Details
LOCATIONS_URL
The base URL for location updates: "/locations".- See Also:
Method Details
getInstance
Gets the instance of the locations manager.- Returns:
- The instance, null if not initialized yet.
isLocationsURL
Verifies if the URL is a location update URL.- Returns:
- true if this is a location URL, false otherwise.
initializeInstance
Creates the singleton instance.- Returns:
- The receiver The receiver instance.
- Throws:
IllegalStateException
- If the singleton already is created.
addLocation
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.