Package com.iizix.server.geo
Class LocationsManager
- java.lang.Object
- com.iizix.server.geo.LocationsManager
 
- public class LocationsManager extends java.lang.ObjectThe manager for locations used for background updated from devices posted using HTTP(S).- Author:
- Christopher Mindus
 
- Field Summary- Fields - Modifier and Type - Field - Description - static java.lang.String- LOCATIONS_URLThe base URL for location updates: "/locations".
 - Method Summary- All Methods Static Methods Instance Methods Concrete Methods - Modifier and Type - Method - Description - boolean- addLocation(AuthenticatedUser user, DeviceLocation location)Adds a new location for a user.- static LocationsManager- getInstance()Gets the instance of the locations manager.- static ILocationReceiver- initializeInstance(ServerShell server)Creates the singleton instance.- static boolean- isLocationsURL(java.lang.String url)Verifies if the URL is a location update URL.
 
- Field Detail- LOCATIONS_URL- public static final java.lang.String LOCATIONS_URL The base URL for location updates: "/locations".- See Also:
- Constant Field Values
 
 
 - Method Detail- 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(java.lang.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:
- java.lang.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:
- java.lang.NullPointerException- If one of the parameters are null.