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 SummaryFieldsModifier and TypeFieldDescription- static final StringThe base URL for location updates: "/locations".
- Method SummaryModifier and TypeMethodDescription- boolean- addLocation- (AuthenticatedUser user, DeviceLocation location) Adds a new location for a user.- static LocationsManagerGets 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_URLThe base URL for location updates: "/locations".- See Also:
 
 
- Method Details- getInstanceGets the instance of the locations manager.- Returns:
- The instance, null if not initialized yet.
 
- isLocationsURLVerifies if the URL is a location update URL.- Returns:
- true if this is a location URL, false otherwise.
 
- initializeInstanceCreates the singleton instance.- Returns:
- The receiver The receiver instance.
- Throws:
- IllegalStateException- If the singleton already is created.
 
- addLocationAdds 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.