Class ConnectedUser
java.lang.Object
org.deltava.beans.servinfo.NetworkUser
org.deltava.beans.servinfo.ConnectedUser
- All Implemented Interfaces:
Serializable,Comparable<NetworkUser>,GeoLocation,MapEntry,MarkerMapEntry,ViewEntry
- Direct Known Subclasses:
Controller,Pilot
A bean to store information about users connected to an FSD server.
- Since:
- 3.4
- Version:
- 10.3
- Author:
- Luke
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.deltava.beans.servinfo.NetworkUser
NetworkUser.Type -
Field Summary
FieldsFields inherited from interface org.deltava.beans.GeoLocation
ALL, DEGREE_FEET, DEGREE_MILES, FEET_MILES, LAT_DIRECTIONS, LATITUDE, LON_DIRECTIONS, LONGITUDE, RADIAN_MILES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the user's callsign.final doubleReturns the latitude of this location.Returns the date/time of the user's connection.final doubleReturns the longitude of this location.Returns the User's current position.Returns the FSD Server this user is connected to.booleanReturns if the User has a location set.voidsetCallsign(String cs) Updates the user's callsign.voidsetLoginTime(Instant dt) Updates the date/time of the user's last connection.voidsetPosition(double lat, double lon) Updates the User's position.voidUpdates the FSD Server this user is connected to.Methods inherited from class org.deltava.beans.servinfo.NetworkUser
compareTo, equals, getFirstName, getID, getLastName, getName, getNetwork, getPilotID, getRating, getRowClassName, getType, hashCode, setFirstName, setLastName, setName, setPilotID, setRating, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.deltava.beans.GeoLocation
distanceFeet, distanceToMethods inherited from interface org.deltava.beans.MapEntry
getInfoBoxMethods inherited from interface org.deltava.beans.MarkerMapEntry
getIconColor
-
Field Details
-
_position
The user's position, or null if not set.
-
-
Constructor Details
-
ConnectedUser
Initializes the user.- Parameters:
id- the network IDnet- the OnlineNetwork
-
-
Method Details
-
getCallsign
-
getLatitude
public final double getLatitude()Description copied from interface:GeoLocationReturns the latitude of this location.- Specified by:
getLatitudein interfaceGeoLocation- Returns:
- the latitude in degrees
-
getLongitude
public final double getLongitude()Description copied from interface:GeoLocationReturns the longitude of this location.- Specified by:
getLongitudein interfaceGeoLocation- Returns:
- the longitude in degrees
-
hasLocation
public boolean hasLocation()Returns if the User has a location set.- Returns:
- TRUE if a location has been set, otherwise FALSE
-
getLoginTime
Returns the date/time of the user's connection.- Returns:
- the login date/time
-
getPosition
Returns the User's current position.- Returns:
- a GeoPosition bean containing latitude and longitude
- See Also:
-
getServer
Returns the FSD Server this user is connected to.- Returns:
- the server name
- See Also:
-
setPosition
public void setPosition(double lat, double lon) Updates the User's position. This has a ServInfo hack where latitudes of -290 to -350 are mapped to latitudes in the Northern Hemisphere.- Parameters:
lat- the latitude in degreeslon- the longitude in degrees- See Also:
-
setLoginTime
Updates the date/time of the user's last connection.- Parameters:
dt- the connection date/time
-
setCallsign
Updates the user's callsign.- Parameters:
cs- the callsign- Throws:
NullPointerException- if cs is null- See Also:
-
setServer
Updates the FSD Server this user is connected to.- Parameters:
srv- the server name- Throws:
NullPointerException- if srv is null- See Also:
-