Class LoginAddress
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.system.LoginAddress
- All Implemented Interfaces:
Serializable, Comparable<Object>, IDBean, RemoteAddressBean, Cacheable
A bean to store Login address information for a user.
- Since:
- 1.0
- Version:
- 10.2
- Author:
- Luke
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of logins by this user from this address.Returns the remote IP address.Returns the remote host name.voidsetLoginCount(int logins) Updates the number of logins by this user from this address.voidsetRemoteAddr(String addr) Updates the IP address used to log in.voidsetRemoteHost(String host) Updates the host name used to log in.Methods inherited from class DatabaseBean
cacheKey, compareTo, equals, getHexID, getID, hashCode, setID, validateID, validateIDMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface RemoteAddressBean
getIsResolved
-
Constructor Details
-
LoginAddress
public LoginAddress(int id) Initializes the bean.- Parameters:
id- the database ID of the user
-
-
Method Details
-
getRemoteAddr
Description copied from interface:RemoteAddressBeanReturns the remote IP address.- Specified by:
getRemoteAddrin interfaceRemoteAddressBean- Returns:
- an IPv4 or IPv6 address
-
getRemoteHost
Description copied from interface:RemoteAddressBeanReturns the remote host name.- Specified by:
getRemoteHostin interfaceRemoteAddressBean- Returns:
- the host name, or address if unresolved
-
getLoginCount
public int getLoginCount()Returns the number of logins by this user from this address.- Returns:
- the number of logins
- See Also:
-
setRemoteAddr
Updates the IP address used to log in.- Parameters:
addr- the IP address- See Also:
-
setRemoteHost
Updates the host name used to log in.- Parameters:
host- the host name- See Also:
-
setLoginCount
public void setLoginCount(int logins) Updates the number of logins by this user from this address.- Parameters:
logins- the number of logins- Throws:
IllegalArgumentException- if logins is negative- See Also:
-